Fix type annotations for utils.parse.keyvalue
This commit is contained in:
parent
6bb03c4519
commit
0f53d2e828
1 changed files with 3 additions and 2 deletions
|
@ -56,8 +56,9 @@ def docstring(s: str) -> Docstring:
|
|||
description += line
|
||||
return Docstring(description, items, var_items)
|
||||
|
||||
def keyvalue(s, delimiter: str=" ") -> typing.Dict[str, str]:
|
||||
items = {}
|
||||
def keyvalue(s: str, delimiter: str=" "
|
||||
) -> typing.Dict[str, typing.Optional[str]]:
|
||||
items = {} # type: typing.Dict[str, typing.Optional[str]]
|
||||
pairs = s.split(delimiter)
|
||||
for pair in filter(None, pairs):
|
||||
key, sep, value = pair.partition("=")
|
||||
|
|
Loading…
Reference in a new issue