aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-05 11:56:52 +0000
committerGravatar jesopo2018-11-05 11:56:52 +0000
commit7cc6b559be40e3aa82d99a828951a272f03b0dff (patch)
treeb43acebcc8460ecf73292a2726b127f74ebd82b7 /src/utils
parentAdd 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')
-rw-r--r--src/utils/parse.py7
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()