Small correction: mixed up a re.match and re.search.

This commit is contained in:
Dave Halter committed 2015-02-20 00:48:05 +01:00
1 parent ce96af5e04
commit 0b5a509e83
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -489,7 +489,7 @@ class FastTokenizer(object):
return current
if value in ('def', 'class') and self._parentheses_level \
and re.match('\n[ \t]*\Z', prefix):
and re.search(r'\n[ \t]*\Z', prefix):
# Account for the fact that an open parentheses before a function
# will reset the parentheses counter, but new lines before will
# still be ignored. So check the prefix.