Mercurial > hg-stable
comparison contrib/import-checker.py @ 32331:bd872f64a8ba
cleanup: use set literals
We no longer support Python 2.6, so we can now use set literals.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 10 Feb 2017 16:56:29 -0800 |
parents | 65cd7e705ff6 |
children | a9c71d578a1c |
comparison
equal
deleted
inserted
replaced
32330:2959c3e986e0 | 32331:bd872f64a8ba |
---|---|
211 yield m | 211 yield m |
212 for m in 'cPickle', 'datetime': # in Python (not C) on PyPy | 212 for m in 'cPickle', 'datetime': # in Python (not C) on PyPy |
213 yield m | 213 yield m |
214 for m in ['cffi']: | 214 for m in ['cffi']: |
215 yield m | 215 yield m |
216 stdlib_prefixes = set([sys.prefix, sys.exec_prefix]) | 216 stdlib_prefixes = {sys.prefix, sys.exec_prefix} |
217 # We need to supplement the list of prefixes for the search to work | 217 # We need to supplement the list of prefixes for the search to work |
218 # when run from within a virtualenv. | 218 # when run from within a virtualenv. |
219 for mod in (BaseHTTPServer, zlib): | 219 for mod in (BaseHTTPServer, zlib): |
220 try: | 220 try: |
221 # Not all module objects have a __file__ attribute. | 221 # Not all module objects have a __file__ attribute. |