contrib/check-code.py
changeset 14005 bb391e0515ba
parent 13748 26f8844d1757
child 14009 64de9ca66511
equal deleted inserted replaced
14004:97ed99d1f419 14005:bb391e0515ba
   148     (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S',
   148     (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S',
   149      "missing whitespace around operator"),
   149      "missing whitespace around operator"),
   150     (r'[^+=*!<>&| -](\s=|=\s)[^= ]',
   150     (r'[^+=*!<>&| -](\s=|=\s)[^= ]',
   151      "wrong whitespace around ="),
   151      "wrong whitespace around ="),
   152     (r'raise Exception', "don't raise generic exceptions"),
   152     (r'raise Exception', "don't raise generic exceptions"),
       
   153     (r'^\s*except:$', "warning: naked except clause"),
   153     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   154     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
   154      "warning: unwrapped ui message"),
   155      "warning: unwrapped ui message"),
   155     (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
   156     (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
   156     (r' [=!]=\s+(True|False|None)',
   157     (r' [=!]=\s+(True|False|None)',
   157      "comparison with singleton, use 'is' or 'is not' instead"),
   158      "comparison with singleton, use 'is' or 'is not' instead"),