mirror of https://github.com/pypa/pip
Remove strict_optional=False for models/link.py.
This commit is contained in:
parent
0baec60bdc
commit
190ea6a3d4
|
@ -53,9 +53,6 @@ strict_optional = False
|
||||||
[mypy-pip/_internal/models/format_control]
|
[mypy-pip/_internal/models/format_control]
|
||||||
strict_optional = False
|
strict_optional = False
|
||||||
|
|
||||||
[mypy-pip/_internal/models/link]
|
|
||||||
strict_optional = False
|
|
||||||
|
|
||||||
[mypy-pip/_internal/operations/check]
|
[mypy-pip/_internal/operations/check]
|
||||||
strict_optional = False
|
strict_optional = False
|
||||||
|
|
||||||
|
|
|
@ -206,5 +206,8 @@ class Link(KeyBasedCompareMixin):
|
||||||
"""
|
"""
|
||||||
if not self.has_hash:
|
if not self.has_hash:
|
||||||
return False
|
return False
|
||||||
|
# Assert non-None so mypy knows self.hash_name and self.hash are str.
|
||||||
|
assert self.hash_name is not None
|
||||||
|
assert self.hash is not None
|
||||||
|
|
||||||
return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
|
return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
|
||||||
|
|
Loading…
Reference in New Issue