279 (r'(?:(?<!def)\s+|\()hasattr', |
279 (r'(?:(?<!def)\s+|\()hasattr', |
280 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
280 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), |
281 (r'opener\([^)]*\).read\(', |
281 (r'opener\([^)]*\).read\(', |
282 "use opener.read() instead"), |
282 "use opener.read() instead"), |
283 (r'BaseException', 'not in Python 2.4, use Exception'), |
283 (r'BaseException', 'not in Python 2.4, use Exception'), |
284 (r'os\.path\.relpath', 'os.path.relpath is not in Python 2.5'), |
|
285 (r'opener\([^)]*\).write\(', |
284 (r'opener\([^)]*\).write\(', |
286 "use opener.write() instead"), |
285 "use opener.write() instead"), |
287 (r'[\s\(](open|file)\([^)]*\)\.read\(', |
286 (r'[\s\(](open|file)\([^)]*\)\.read\(', |
288 "use util.readfile() instead"), |
287 "use util.readfile() instead"), |
289 (r'[\s\(](open|file)\([^)]*\)\.write\(', |
288 (r'[\s\(](open|file)\([^)]*\)\.write\(', |