diff options
author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2018-05-19 07:42:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-19 07:42:06 -0500 |
commit | 036461879fbfdb4ddbb689163e968d7f00ded66f (patch) | |
tree | fd104529dcf998cb35f6ae175dd491958c45806e | |
parent | f4f6e556faea76809b70413fea9f496288d56713 (diff) | |
parent | 7ca10fe5788f88bfa78d93cfcfc3d0df352a187e (diff) | |
download | pep8-036461879fbfdb4ddbb689163e968d7f00ded66f.tar.gz |
Merge pull request #751 from hhatto/w504-position
Change the position pointed out by W504
-rwxr-xr-x | pycodestyle.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index e738f22..50149f1 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -1279,6 +1279,7 @@ def break_after_binary_operator(logical_line, tokens): Okay: var = (1 /\n -2) Okay: var = (1 +\n -1 +\n -2) """ + prev_start = None for context in _break_around_binary_operators(tokens): (token_type, text, previous_token_type, previous_text, line_break, unary_context, start) = context @@ -1286,8 +1287,8 @@ def break_after_binary_operator(logical_line, tokens): line_break and not unary_context and not _is_binary_operator(token_type, text)): - error_pos = (start[0] - 1, start[1]) - yield error_pos, "W504 line break after binary operator" + yield prev_start, "W504 line break after binary operator" + prev_start = start @register_check |