summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-12-16 14:51:52 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-12-16 21:04:11 +0100
commit6a2f71b19fb107983af6bb321fa6cb3b78650f4a (patch)
treee0f286f059c63a68ce2d112ee7c79ba541e7c40a /pep8.py
parentab63c978ac3540cd556f880d6035264deea8cb6e (diff)
downloadpep8-6a2f71b19fb107983af6bb321fa6cb3b78650f4a.tar.gz
Fix false positive E713; issue #330issue336
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 7a50ab3..338b434 100755
--- a/pep8.py
+++ b/pep8.py
@@ -108,7 +108,7 @@ EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
WHITESPACE_AFTER_COMMA_REGEX = re.compile(r'[,;:]\s*(?: |\t)')
COMPARE_SINGLETON_REGEX = re.compile(r'\b(None|False|True)?\s*([=!]=)'
r'\s*(?(1)|(None|False|True))\b')
-COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+[^[({ ]+\s+(in|is)\s')
+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'
r'|\s*\(\s*([^)]*[^ )])\s*\))')
KEYWORD_REGEX = re.compile(r'(\s*)\b(?:%s)\b(\s*)' % r'|'.join(KEYWORDS))