175 (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"), |
175 (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"), |
176 (r' [=!]=\s+(True|False|None)', |
176 (r' [=!]=\s+(True|False|None)', |
177 "comparison with singleton, use 'is' or 'is not' instead"), |
177 "comparison with singleton, use 'is' or 'is not' instead"), |
178 (r'^\s*(while|if) [01]:', |
178 (r'^\s*(while|if) [01]:', |
179 "use True/False for constant Boolean expression"), |
179 "use True/False for constant Boolean expression"), |
180 (r'(?<!def)\s+hasattr', |
180 (r'(?:(?<!def)\s+|\()hasattr', |
181 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
181 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
182 (r'opener\([^)]*\).read\(', |
182 (r'opener\([^)]*\).read\(', |
183 "use opener.read() instead"), |
183 "use opener.read() instead"), |
184 (r'BaseException', 'not in Py2.4, use Exception'), |
184 (r'BaseException', 'not in Py2.4, use Exception'), |
185 (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'), |
185 (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'), |