Skip to content
Snippets Groups Projects
Commit bc3b48b0 authored by durin42's avatar durin42
Browse files

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.
parent 532fa120
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment