contrib/check-code.py
branchstable
changeset 11522 eaa7666ad53f
parent 11345 4b81f82b03e3
child 11568 d5d4e6a30613
child 11599 6fcc066c0c2c
equal deleted inserted replaced
11521:3efadce5b346 11522:eaa7666ad53f
    92     (r'[\x80-\xff]', "non-ASCII character literal"),
    92     (r'[\x80-\xff]', "non-ASCII character literal"),
    93     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
    93     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
    94     (r'^\s*with\s+', "with not available in Python 2.4"),
    94     (r'^\s*with\s+', "with not available in Python 2.4"),
    95     (r'(?<!def)\s+(any|all|format)\(',
    95     (r'(?<!def)\s+(any|all|format)\(',
    96      "any/all/format not available in Python 2.4"),
    96      "any/all/format not available in Python 2.4"),
       
    97     (r'(?<!def)\s+(callable)\(',
       
    98      "callable not available in Python 3, use hasattr(f, '__call__')"),
    97     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
    99     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
    98     (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
   100     (r'([\(\[]\s\S)|(\S\s[\)\]])', "gratuitous whitespace in () or []"),
    99 #    (r'\s\s=', "gratuitous whitespace before ="),
   101 #    (r'\s\s=', "gratuitous whitespace before ="),
   100     (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S',
   102     (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\S',
   101      "missing whitespace around operator"),
   103      "missing whitespace around operator"),