Skip to content

Commit 480c7cb

Browse files
committed
Fix definition of isidentifier in Python 2
1 parent 82137f8 commit 480c7cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pep8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def readlines(filename):
11161116
"""Read the source code."""
11171117
with open(filename, 'rU') as f:
11181118
return f.readlines()
1119-
isidentifier = re.compile(r'[a-zA-Z_]\w*').match
1119+
isidentifier = re.compile(r'[a-zA-Z_]\w*$').match
11201120
stdin_get_value = sys.stdin.read
11211121
else:
11221122
# Python 3

0 commit comments

Comments
 (0)