summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2014-12-16 07:34:10 +0100
committerFlorent Xicluna <florent.xicluna@gmail.com>2014-12-16 07:34:56 +0100
commit480c7cb956a77bd20f221b7fc25f6232b50f6b3a (patch)
treee617d849dd442c8602a56a238dfbe11be38e65be
parent82137f8e662974063fcacec37f6abbe8d96768d3 (diff)
downloadpep8-480c7cb956a77bd20f221b7fc25f6232b50f6b3a.tar.gz
Fix definition of isidentifier in Python 2
-rwxr-xr-xpep8.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 12fbe81..a38b4f4 100755
--- a/pep8.py
+++ b/pep8.py
@@ -1116,7 +1116,7 @@ if '' == ''.encode():
"""Read the source code."""
with open(filename, 'rU') as f:
return f.readlines()
- isidentifier = re.compile(r'[a-zA-Z_]\w*').match
+ isidentifier = re.compile(r'[a-zA-Z_]\w*$').match
stdin_get_value = sys.stdin.read
else:
# Python 3