diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-05-20 20:26:27 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-05-20 20:26:27 -0500 |
| commit | 25566468a22b348a9d1e0abd9395703658728402 (patch) | |
| tree | 0c6852ed45e0c4f7bd32b31dd64b903066b96490 /src | |
| parent | deb4936f5ddfd0a9db22791af10c97754b475685 (diff) | |
| download | flake8-25566468a22b348a9d1e0abd9395703658728402.tar.gz | |
Filter out empty ignore/select codes
When we parse out our comma separated lists, we should ignore empty
strings to avoid them breaking users' expectations.
Closes #330
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flake8/utils.py b/src/flake8/utils.py index 4eb6537..a4c67ce 100644 --- a/src/flake8/utils.py +++ b/src/flake8/utils.py @@ -29,7 +29,8 @@ def parse_comma_separated_list(value): if not isinstance(value, (list, tuple)): value = value.split(',') - return [item.strip() for item in value] + item_gen = (item.strip() for item in value) + return [item for item in item_gen if item] def normalize_paths(paths, parent=os.curdir): |
