contrib/check-code.py
changeset 18762 a91387a37f05
parent 18683 a343eccd5ee2
child 18832 a911e5dc2b00
equal deleted inserted replaced
18761:8cc8715b3603 18762:a91387a37f05
   214     (r'[\s\(](open|file)\([^)]*\)\.',
   214     (r'[\s\(](open|file)\([^)]*\)\.',
   215      "always assign an opened file to a variable, and close it afterwards"),
   215      "always assign an opened file to a variable, and close it afterwards"),
   216     (r'(?i)descendent', "the proper spelling is descendAnt"),
   216     (r'(?i)descendent', "the proper spelling is descendAnt"),
   217     (r'\.debug\(\_', "don't mark debug messages for translation"),
   217     (r'\.debug\(\_', "don't mark debug messages for translation"),
   218     (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
   218     (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"),
   219     (r'^\s*except\s*:', "warning: naked except clause", r'#.*re-raises'),
   219     (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'),
   220     (r':\n(    )*( ){1,3}[^ ]', "must indent 4 spaces"),
   220     (r':\n(    )*( ){1,3}[^ ]', "must indent 4 spaces"),
   221     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   221     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   222      "missing _() in ui message (use () to hide false-positives)"),
   222      "missing _() in ui message (use () to hide false-positives)"),
   223   ],
   223   ],
   224   # warnings
   224   # warnings