174 "use True/False for constant Boolean expression"), |
174 "use True/False for constant Boolean expression"), |
175 (r'(?<!def)\s+hasattr', |
175 (r'(?<!def)\s+hasattr', |
176 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
176 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
177 (r'opener\([^)]*\).read\(', |
177 (r'opener\([^)]*\).read\(', |
178 "use opener.read() instead"), |
178 "use opener.read() instead"), |
|
179 (r'BaseException', 'not in Py2.4, use Exception'), |
|
180 (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'), |
179 (r'opener\([^)]*\).write\(', |
181 (r'opener\([^)]*\).write\(', |
180 "use opener.write() instead"), |
182 "use opener.write() instead"), |
181 (r'[\s\(](open|file)\([^)]*\)\.read\(', |
183 (r'[\s\(](open|file)\([^)]*\)\.read\(', |
182 "use util.readfile() instead"), |
184 "use util.readfile() instead"), |
183 (r'[\s\(](open|file)\([^)]*\)\.write\(', |
185 (r'[\s\(](open|file)\([^)]*\)\.write\(', |