mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Style change in packaging: use “not in” over “not x in”.
Such tests are IMO easier to read if both operators are grouped.
This commit is contained in:
parent
46bdcf7d4b
commit
df8ef02488
5 changed files with 16 additions and 16 deletions
|
|
@ -256,7 +256,7 @@ class DistInfo(IndexReference):
|
|||
hashlib.new(hashname)
|
||||
except ValueError:
|
||||
raise UnsupportedHashName(hashname)
|
||||
if not url in [u['url'] for u in self.urls]:
|
||||
if url not in [u['url'] for u in self.urls]:
|
||||
self.urls.append({
|
||||
'url': url,
|
||||
'hashname': hashname,
|
||||
|
|
@ -329,7 +329,7 @@ class DistInfo(IndexReference):
|
|||
url param"""
|
||||
hashname = self.url['hashname']
|
||||
expected_hashval = self.url['hashval']
|
||||
if not None in (expected_hashval, hashname):
|
||||
if None not in (expected_hashval, hashname):
|
||||
with open(filename, 'rb') as f:
|
||||
hashval = hashlib.new(hashname)
|
||||
hashval.update(f.read())
|
||||
|
|
@ -409,7 +409,7 @@ class ReleasesList(IndexReference):
|
|||
(release.name, self.name))
|
||||
version = str(release.version)
|
||||
|
||||
if not version in self.get_versions():
|
||||
if version not in self.get_versions():
|
||||
# append only if not already exists
|
||||
self.releases.append(release)
|
||||
for dist in release.dists.values():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue