diff options
author | Matthew Wang <mattwyl@gmail.com> | 2013-02-25 22:08:30 +0800 |
---|---|---|
committer | Matthew Wang <mattwyl@gmail.com> | 2013-02-25 22:29:25 +0800 |
commit | 9aac3c0685843b8c1c204a83354de89f0c13979a (patch) | |
tree | 493cc32bb49f386d00da20efbaf966af316c353a | |
parent | c2762148742ac9dba4f3ea2acaad6b5dd8be62f0 (diff) | |
download | pep8-9aac3c0685843b8c1c204a83354de89f0c13979a.tar.gz |
Fix misleading error message for E251
-rwxr-xr-x | pep8.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -751,12 +751,12 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): parens = 0 no_space = False prev_end = None + message = "E251 unexpected spaces around keyword / parameter equals" for token_type, text, start, end, line in tokens: if no_space: no_space = False if start != prev_end: - yield (prev_end, - "E251 no spaces around keyword / parameter equals") + yield (prev_end, message) elif token_type == tokenize.OP: if text == '(': parens += 1 @@ -765,8 +765,7 @@ def whitespace_around_named_parameter_equals(logical_line, tokens): elif parens and text == '=': no_space = True if start != prev_end: - yield (prev_end, - "E251 no spaces around keyword / parameter equals") + yield (prev_end, message) prev_end = end |