Remove strict_optional=False for models/link.py.

This commit is contained in:
Chris Jerdonek 2019-07-14 23:03:40 -07:00
parent 0baec60bdc
commit 190ea6a3d4
2 changed files with 3 additions and 3 deletions

View File

@ -53,9 +53,6 @@ strict_optional = False
[mypy-pip/_internal/models/format_control]
strict_optional = False
[mypy-pip/_internal/models/link]
strict_optional = False
[mypy-pip/_internal/operations/check]
strict_optional = False

View File

@ -206,5 +206,8 @@ class Link(KeyBasedCompareMixin):
"""
if not self.has_hash:
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)