comparison contrib/check-code.py @ 19872:681f7b9213a4

check-code: check for spaces around = for named parameters
author Mads Kiilerich <madski@unity3d.com>
date Thu, 03 Oct 2013 14:50:47 +0200
parents 6fb1b7728719
children b3de50b0c7aa
comparison
equal deleted inserted replaced
19871:6e74632170d3 19872:681f7b9213a4
224 "missing whitespace around operator"), 224 "missing whitespace around operator"),
225 (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', 225 (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S',
226 "missing whitespace around operator"), 226 "missing whitespace around operator"),
227 (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', 227 (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]',
228 "wrong whitespace around ="), 228 "wrong whitespace around ="),
229 (r'\([^()]*( =[^=]|[^<>!=]= )',
230 "no whitespace around = for named parameters"),
229 (r'raise Exception', "don't raise generic exceptions"), 231 (r'raise Exception', "don't raise generic exceptions"),
230 (r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$', 232 (r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$',
231 "don't use old-style two-argument raise, use Exception(message)"), 233 "don't use old-style two-argument raise, use Exception(message)"),
232 (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"), 234 (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
233 (r' [=!]=\s+(True|False|None)', 235 (r' [=!]=\s+(True|False|None)',