Checking for the presence of the seperator in the return from .partition is a
more "correct" way of doing this
This commit is contained in:
parent
feed251f82
commit
f2d9ff9d3b
1 changed files with 2 additions and 2 deletions
|
@ -136,8 +136,8 @@ def get_hashflags(filename):
|
||||||
if not line.startswith("#"):
|
if not line.startswith("#"):
|
||||||
break
|
break
|
||||||
elif line.startswith("#--"):
|
elif line.startswith("#--"):
|
||||||
hashflag, _, value = line.replace("#--", "", 1).partition(" ")
|
hashflag, sep, value = line.replace[3:].partition(" ")
|
||||||
hashflags[hashflag] = value or None
|
hashflags[hashflag] = value if sep else None
|
||||||
return hashflags.items()
|
return hashflags.items()
|
||||||
|
|
||||||
class Docstring(object):
|
class Docstring(object):
|
||||||
|
|
Loading…
Reference in a new issue