diff options
author | Mike Miller <mike@mtmxr.com> | 2016-06-03 10:02:08 -0700 |
---|---|---|
committer | Mike Miller <mike@mtmxr.com> | 2016-06-03 10:02:08 -0700 |
commit | 017d3b5da0c37bd48df3778752bfa98b4eed6d5e (patch) | |
tree | 88c9f70168f6a9801893c6c105ccba95f1ce8251 | |
parent | 4c8152c7da74d7f7e20d3ae98b52581ef1b0f16b (diff) | |
download | pep8-017d3b5da0c37bd48df3778752bfa98b4eed6d5e.tar.gz |
Also report E741 on 'global' and 'nonlocal' statements
-rwxr-xr-x | pycodestyle.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 38648a3..f92d860 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -1180,8 +1180,8 @@ def ambiguous_identifier(logical_line, tokens): if prev_text in idents_to_avoid: ident = prev_text pos = prev_start - # identifiers after 'as' - if prev_text == 'as': + # identifiers bound to a value with 'as', 'global', or 'nonlocal' + if prev_text in ('as', 'global', 'nonlocal'): if text in idents_to_avoid: ident = text pos = start |