diff options
| author | 2018-10-04 15:27:52 +0100 | |
|---|---|---|
| committer | 2018-10-04 15:27:52 +0100 | |
| commit | f2d9ff9d3b70c9396e4a2b0106b2a5deb2578282 (patch) | |
| tree | 51dce536731e5b555e3c410a81d77138456a3f50 /src | |
| parent | Non-present hashflag values should be None, not empty string (diff) | |
| signature | ||
Checking for the presence of the seperator in the return from .partition is a
more "correct" way of doing this
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 745a8864..4cdd141d 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -136,8 +136,8 @@ def get_hashflags(filename): if not line.startswith("#"): break elif line.startswith("#--"): - hashflag, _, value = line.replace("#--", "", 1).partition(" ") - hashflags[hashflag] = value or None + hashflag, sep, value = line.replace[3:].partition(" ") + hashflags[hashflag] = value if sep else None return hashflags.items() class Docstring(object): |
