Skip to content

Commit

Permalink
Merge pull request #850 from asottile/E721_false_positive
Browse files Browse the repository at this point in the history
Fix E721 false positive
  • Loading branch information
sigmavirus24 committed Mar 1, 2019
2 parents d1e2986 + 0327e55 commit 1a3f827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pycodestyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def lru_cache(maxsize=128): # noqa as it's a fake implementation.
COMPARE_SINGLETON_REGEX = re.compile(r'(\bNone|\bFalse|\bTrue)?\s*([=!]=)'
r'\s*(?(1)|(None|False|True))\b')
COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+[^][)(}{ ]+\s+(in|is)\s')
COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s*type(?:s.\w+Type'
COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s+type(?:s.\w+Type'
r'|\s*\(\s*([^)]*[^ )])\s*\))')
KEYWORD_REGEX = re.compile(r'(\s*)\b(?:%s)\b(\s*)' % r'|'.join(KEYWORDS))
OPERATOR_REGEX = re.compile(r'(?:[^,\s])(\s*)(?:[-+*/|!<=>%&^]+)(\s*)')
Expand Down
3 changes: 3 additions & 0 deletions testsuite/E72.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
pass
if type(a) != type(b) or type(a) == type(ccc):
pass
#: Okay
def func_histype(a, b, c):
pass
#: E722
try:
pass
Expand Down

0 comments on commit 1a3f827

Please sign in to comment.