Skip to content

Commit 3f397db

Browse files
Offical documentation appears to say typing.Mapping is best for kwargs
1 parent 41cf63b commit 3f397db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vmf_tool/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import io
44
import re
5-
from typing import Any, Dict, ItemsView, Iterable, List, Union
5+
from typing import Any, ItemsView, Iterable, List, Mapping, Union
66

77

88
def parse(string_or_file: Union[str, io.TextIOWrapper, io.StringIO]) -> Namespace:
@@ -153,7 +153,7 @@ class Namespace:
153153
"""Maps objects like a dictionary, all keys are strings.
154154
Values can be accessed as class attributes.
155155
If a key is not a valid attribute name, if can be used like a dictionary key."""
156-
def __init__(self, **presets: Dict[str, Any]):
156+
def __init__(self, **presets: Mapping[str, Any]):
157157
# absorb presets
158158
for key, value in presets.items():
159159
if isinstance(value, dict):

0 commit comments

Comments
 (0)