contrib/check-code.py
changeset 49570 3a2b6158374a
parent 48946 642e31cb55f0
child 50725 7e5be4a7cda7
equal deleted inserted replaced
49564:da48f170d203 49570:3a2b6158374a
   369         (
   369         (
   370             r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S',
   370             r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S',
   371             "missing whitespace around operator",
   371             "missing whitespace around operator",
   372         ),
   372         ),
   373         (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', "wrong whitespace around ="),
   373         (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]', "wrong whitespace around ="),
   374         (
       
   375             r'\([^()]*( =[^=]|[^<>!=]= )',
       
   376             "no whitespace around = for named parameters",
       
   377         ),
       
   378         (
   374         (
   379             r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$',
   375             r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$',
   380             "don't use old-style two-argument raise, use Exception(message)",
   376             "don't use old-style two-argument raise, use Exception(message)",
   381         ),
   377         ),
   382         (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
   378         (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),