diff options
author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2018-11-28 07:13:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 07:13:16 -0600 |
commit | c507b725d9e0bed14505f87cd2397ac7ac489485 (patch) | |
tree | 23cbe7f3edc884edb616656d2d2b9233ea6eb791 | |
parent | 3d37ea0aa2e369852c98bbbcaef8a89ed00996dc (diff) | |
parent | bab1c9c57392717fb523105655bd5fa5a179a399 (diff) | |
download | pep8-c507b725d9e0bed14505f87cd2397ac7ac489485.tar.gz |
Merge pull request #820 from wwwjfy/w606-tweak
refs W606, only NAME can follow await
-rwxr-xr-x | pycodestyle.py | 2 | ||||
-rw-r--r-- | testsuite/W60.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index c9e1667..73f4076 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -1580,7 +1580,7 @@ def python_3000_async_await_keywords(logical_line, tokens): else: error = True elif state[0] == 'await': - if token_type in (tokenize.NAME, tokenize.NUMBER, tokenize.STRING): + if token_type == tokenize.NAME: # An await expression. Return to looking for async/await # names. state = None diff --git a/testsuite/W60.py b/testsuite/W60.py index 4cbaad9..78b163e 100644 --- a/testsuite/W60.py +++ b/testsuite/W60.py @@ -45,6 +45,10 @@ async = 42 #: W606 await = 42 #: W606 +await 42 +#: W606 +await 'test' +#: W606 def async(): pass #: W606 |