Mercurial > hg
changeset 20201:bc3b48b0f5c8
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.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 01 Jan 2014 17:57:48 -0500 |
parents | 532fa12033e1 |
children | a6014018ec28 |
files | contrib/import-checker.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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