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