diff options
| author | 2018-11-05 11:56:52 +0000 | |
|---|---|---|
| committer | 2018-11-05 11:56:52 +0000 | |
| commit | 7cc6b559be40e3aa82d99a828951a272f03b0dff (patch) | |
| tree | b43acebcc8460ecf73292a2726b127f74ebd82b7 /src/utils/parse.py | |
| parent | Add src.utils.parse.keyvalue, mostly for IRCv3 CAP negotiation (diff) | |
| signature | ||
Clarify `items` and `var_items` typing in src.utils.parse
Diffstat (limited to 'src/utils/parse.py')
| -rw-r--r-- | src/utils/parse.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils/parse.py b/src/utils/parse.py index 4fa3bb79..e3d3d52b 100644 --- a/src/utils/parse.py +++ b/src/utils/parse.py @@ -21,7 +21,8 @@ def hashflags(filename: str) -> typing.List[typing.Tuple[str, str]]: return list(hashflags.items()) class Docstring(object): - def __init__(self, description: str, items: dict, var_items: dict): + def __init__(self, description: str, items: typing.Dict[str, str], + var_items: typing.Dict[str, typing.List[str]]): self.description = description self.items = items self.var_items = var_items @@ -29,8 +30,8 @@ class Docstring(object): def docstring(s: str) -> Docstring: description = "" last_item = None - items = {} - var_items = {} + items = {} # type: typing.Dict[str, str] + var_items = {} # type: typing.Dict[str, typing.List[str]] if s: for line in s.split("\n"): line = line.strip() |
