contrib/check-code.py
branchstable
changeset 15334 24856af7237c
parent 15296 4b71c17caeb8
child 15364 572c22c88be6
equal deleted inserted replaced
15333:f37b71fec602 15334:24856af7237c
   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\(',