Show More
@@ -8,6 +8,7 b'' | |||||
8 | # GNU General Public License version 2 or any later version. |
|
8 | # GNU General Public License version 2 or any later version. | |
9 |
|
9 | |||
10 | import re, glob, os, sys |
|
10 | import re, glob, os, sys | |
|
11 | import keyword | |||
11 | import optparse |
|
12 | import optparse | |
12 |
|
13 | |||
13 | def repquote(m): |
|
14 | def repquote(m): | |
@@ -136,6 +137,8 b' pypats = [' | |||||
136 | (r'(?<!def)\s+(callable)\(', |
|
137 | (r'(?<!def)\s+(callable)\(', | |
137 | "callable not available in Python 3, use hasattr(f, '__call__')"), |
|
138 | "callable not available in Python 3, use hasattr(f, '__call__')"), | |
138 | (r'if\s.*\selse', "if ... else form not available in Python 2.4"), |
|
139 | (r'if\s.*\selse', "if ... else form not available in Python 2.4"), | |
|
140 | (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), | |||
|
141 | "gratuitous whitespace after Python keyword"), | |||
139 | (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"), |
|
142 | (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"), | |
140 | # (r'\s\s=', "gratuitous whitespace before ="), |
|
143 | # (r'\s\s=', "gratuitous whitespace before ="), | |
141 | (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', |
|
144 | (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', |
General Comments 0
You need to be logged in to leave comments.
Login now