diff options
| author | Éric Araujo <merwok@netwok.org> | 2011-06-08 02:47:13 (GMT) |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2011-06-08 02:47:13 (GMT) |
| commit | df8ef02488227ab88969360eea5c34bc364aa758 (patch) | |
| tree | 706fd287f755a734f50f4c12fb1b55aac659527e /Lib/packaging/database.py | |
| parent | 46bdcf7d4b966f733aaeb609b7e15903f8bf6ec4 (diff) | |
| download | cpython-df8ef02488227ab88969360eea5c34bc364aa758.zip cpython-df8ef02488227ab88969360eea5c34bc364aa758.tar.gz cpython-df8ef02488227ab88969360eea5c34bc364aa758.tar.bz2 | |
Style change in packaging: use “not in” over “not x in”.
Such tests are IMO easier to read if both operators are grouped.
Diffstat (limited to 'Lib/packaging/database.py')
| -rw-r--r-- | Lib/packaging/database.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/packaging/database.py b/Lib/packaging/database.py index 22d4b13..e3c57ba 100644 --- a/Lib/packaging/database.py +++ b/Lib/packaging/database.py @@ -104,12 +104,12 @@ def _generate_cache(use_egg_info=False, paths=sys.path): for dist in _yield_distributions(gen_dist, gen_egg, paths): if isinstance(dist, Distribution): _cache_path[dist.path] = dist - if not dist.name in _cache_name: + if dist.name not in _cache_name: _cache_name[dist.name] = [] _cache_name[dist.name].append(dist) else: _cache_path_egg[dist.path] = dist - if not dist.name in _cache_name_egg: + if dist.name not in _cache_name_egg: _cache_name_egg[dist.name] = [] _cache_name_egg[dist.name].append(dist) @@ -150,7 +150,7 @@ class Distribution: self.version = self.metadata['Version'] self.path = path - if _cache_enabled and not path in _cache_path: + if _cache_enabled and path not in _cache_path: _cache_path[path] = self def __repr__(self): |
