diff options
author | Adam Johnson <me@adamj.eu> | 2019-02-28 07:32:08 +0100 |
---|---|---|
committer | Adam Johnson <me@adamj.eu> | 2019-02-28 07:32:08 +0100 |
commit | 5c036dcf5f5b464259e75f7b3942885734c4f13f (patch) | |
tree | 3820f00bb8c22337603eeb4412a4a676c238542f | |
parent | 7e10d9a95e34aa7c600f5100ba64e7710c2688f1 (diff) | |
download | pep8-5c036dcf5f5b464259e75f7b3942885734c4f13f.tar.gz |
Check for 'is' and 'in' as well
-rwxr-xr-x | pycodestyle.py | 2 | ||||
-rw-r--r-- | testsuite/E22.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index b2285ba..02a717a 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -120,7 +120,7 @@ FUNCTION_RETURN_ANNOTATION_OP = ['->'] if sys.version_info >= (3, 5) else [] WS_NEEDED_OPERATORS = frozenset([ '**=', '*=', '/=', '//=', '+=', '-=', '!=', '<>', '<', '>', '%=', '^=', '&=', '|=', '==', '<=', '>=', '<<=', '>>=', '=', - 'and', 'or'] + + 'and', 'in', 'is', 'or'] + FUNCTION_RETURN_ANNOTATION_OP) WHITESPACE = frozenset(' \t') NEWLINE = frozenset([tokenize.NL, tokenize.NEWLINE]) diff --git a/testsuite/E22.py b/testsuite/E22.py index 351e976..4974cb3 100644 --- a/testsuite/E22.py +++ b/testsuite/E22.py @@ -80,6 +80,10 @@ i=i +1 i = 1and 1 #: E225 i = 1or 0 +#: E225 +1is 1 +#: E225 +1in [] #: E225 E226 i=i+1 #: E225 E226 |