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"), |