Filter out empty items in utils.parse.keyvalue
This commit is contained in:
parent
7390367a5a
commit
a2292eb439
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ def docstring(s: str) -> Docstring:
|
|||
def keyvalue(s, delimiter: str=" ") -> typing.Dict[str, str]:
|
||||
items = {}
|
||||
pairs = s.split(delimiter)
|
||||
for pair in pairs:
|
||||
for pair in filter(None, pairs):
|
||||
key, sep, value = pair.partition("=")
|
||||
if sep:
|
||||
items[key] = value
|
||||
|
|
Loading…
Reference in a new issue