Show More
@@ -301,6 +301,7 b' pypats = [' | |||||
301 | "comparison with singleton, use 'is' or 'is not' instead"), |
|
301 | "comparison with singleton, use 'is' or 'is not' instead"), | |
302 | (r'^\s*(while|if) [01]:', |
|
302 | (r'^\s*(while|if) [01]:', | |
303 | "use True/False for constant Boolean expression"), |
|
303 | "use True/False for constant Boolean expression"), | |
|
304 | (r'^\s*if False(:| +and)', 'Remove code instead of using `if False`'), | |||
304 | (r'(?:(?<!def)\s+|\()hasattr\(', |
|
305 | (r'(?:(?<!def)\s+|\()hasattr\(', | |
305 | 'hasattr(foo, bar) is broken on py2, use util.safehasattr(foo, bar) ' |
|
306 | 'hasattr(foo, bar) is broken on py2, use util.safehasattr(foo, bar) ' | |
306 | 'instead', r'#.*hasattr-py3-only'), |
|
307 | 'instead', r'#.*hasattr-py3-only'), |
General Comments 0
You need to be logged in to leave comments.
Login now