contrib/check-code.py
changeset 20238 81e905790b30
parent 20014 30eced973b28
child 20239 16b5f498f49c
equal deleted inserted replaced
20237:0d32dd60016c 20238:81e905790b30
   223     (r'^\s*with\s+', "with not available in Python 2.4"),
   223     (r'^\s*with\s+', "with not available in Python 2.4"),
   224     (r'\.isdisjoint\(', "set.isdisjoint not available in Python 2.4"),
   224     (r'\.isdisjoint\(', "set.isdisjoint not available in Python 2.4"),
   225     (r'^\s*except.* as .*:', "except as not available in Python 2.4"),
   225     (r'^\s*except.* as .*:', "except as not available in Python 2.4"),
   226     (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"),
   226     (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"),
   227     (r'(?<!def)\s+(any|all|format)\(',
   227     (r'(?<!def)\s+(any|all|format)\(',
   228      "any/all/format not available in Python 2.4"),
   228      "any/all/format not available in Python 2.4", 'no-py24'),
   229     (r'(?<!def)\s+(callable)\(',
   229     (r'(?<!def)\s+(callable)\(',
   230      "callable not available in Python 3, use getattr(f, '__call__', None)"),
   230      "callable not available in Python 3, use getattr(f, '__call__', None)"),
   231     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
   231     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
   232     (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
   232     (r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
   233      "gratuitous whitespace after Python keyword"),
   233      "gratuitous whitespace after Python keyword"),