changeset 20238:81e905790b30

check-code: do not skip entire file, skip only one match instead Skipping of the entire file has been introduced in bc3b48b0f5c8.
author Simon Heimberg <simohe@besonet.ch>
date Tue, 07 Jan 2014 22:28:45 +0100
parents 0d32dd60016c
children 16b5f498f49c
files contrib/check-code.py contrib/import-checker.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Sat Nov 16 15:46:29 2013 -0500
+++ b/contrib/check-code.py	Tue Jan 07 22:28:45 2014 +0100
@@ -225,7 +225,7 @@
     (r'^\s*except.* as .*:', "except as not available in Python 2.4"),
     (r'^\s*os\.path\.relpath', "relpath not available in Python 2.4"),
     (r'(?<!def)\s+(any|all|format)\(',
-     "any/all/format not available in Python 2.4"),
+     "any/all/format not available in Python 2.4", 'no-py24'),
     (r'(?<!def)\s+(callable)\(',
      "callable not available in Python 3, use getattr(f, '__call__', None)"),
     (r'if\s.*\selse', "if ... else form not available in Python 2.4"),
--- a/contrib/import-checker.py	Sat Nov 16 15:46:29 2013 -0500
+++ b/contrib/import-checker.py	Tue Jan 07 22:28:45 2014 +0100
@@ -75,7 +75,7 @@
         # something in stdlib_prefixes. check-code suppressed because
         # the ast module used by this script implies the availability
         # of any().
-        if not any(libpath.startswith(p) for p in stdlib_prefixes): # no-check-code
+        if not any(libpath.startswith(p) for p in stdlib_prefixes): # no-py24
             continue
         if 'site-packages' in libpath:
             continue