import-checker: suppress check-code about any()
authorAugie Fackler <raf@durin42.com>
Wed, 01 Jan 2014 17:57:48 -0500
changeset 20201 bc3b48b0f5c8
parent 20200 532fa12033e1
child 20202 a6014018ec28
import-checker: suppress check-code about any() ast is a new enough module that this script can't work on any version of Python without any(), so we'll just use it.
contrib/import-checker.py
--- a/contrib/import-checker.py	Tue Dec 24 19:10:04 2013 -0500
+++ b/contrib/import-checker.py	Wed Jan 01 17:57:48 2014 -0500
@@ -71,9 +71,11 @@
         else:
             stdlib_prefixes.add(dirname)
     for libpath in sys.path:
-        # We want to walk everything in sys.path that starts with something
-        # in stdlib_prefixes.
-        if not any(libpath.startswith(p) for p in stdlib_prefixes):
+        # We want to walk everything in sys.path that starts with
+        # 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
             continue
         if 'site-packages' in libpath:
             continue