contrib/check-code.py
changeset 25141 3ea8d6b5e665
parent 25140 317333e0793c
child 25142 24140873ca4c
equal deleted inserted replaced
25140:317333e0793c 25141:3ea8d6b5e665
   243 #     "don't capitalize non-exception classes"),
   243 #     "don't capitalize non-exception classes"),
   244 #    (r'in range\(', "use xrange"),
   244 #    (r'in range\(', "use xrange"),
   245 #    (r'^\s*print\s+', "avoid using print in core and extensions"),
   245 #    (r'^\s*print\s+', "avoid using print in core and extensions"),
   246     (r'[\x80-\xff]', "non-ASCII character literal"),
   246     (r'[\x80-\xff]', "non-ASCII character literal"),
   247     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
   247     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
   248     (r'\.isdisjoint\(', "set.isdisjoint not available in Python 2.4"),
       
   249     (r'(?<!def)\s+(any|all|format)\(',
   248     (r'(?<!def)\s+(any|all|format)\(',
   250      "any/all/format not available in Python 2.4", 'no-py24'),
   249      "any/all/format not available in Python 2.4", 'no-py24'),
   251     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
   250     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
   252     (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
   251     (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
   253      "gratuitous whitespace after Python keyword"),
   252      "gratuitous whitespace after Python keyword"),