279 "always assign an opened file to a variable, and close it afterwards"), |
279 "always assign an opened file to a variable, and close it afterwards"), |
280 (r'(?i)descend[e]nt', "the proper spelling is descendAnt"), |
280 (r'(?i)descend[e]nt', "the proper spelling is descendAnt"), |
281 (r'\.debug\(\_', "don't mark debug messages for translation"), |
281 (r'\.debug\(\_', "don't mark debug messages for translation"), |
282 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), |
282 (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), |
283 (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'), |
283 (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'), |
|
284 (r'^\s*except\s([^\(,]+|\([^\)]+\))\s*,', |
|
285 'legacy exception syntax; use "as" instead of ","'), |
284 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), |
286 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), |
285 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', |
287 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', |
286 "missing _() in ui message (use () to hide false-positives)"), |
288 "missing _() in ui message (use () to hide false-positives)"), |
287 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), |
289 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), |
288 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), |
290 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), |