Skip to content

Commit

Permalink
Remove strict_optional=False for models/link.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjerdonek committed Jul 15, 2019
1 parent 0baec60 commit 190ea6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,8 @@ def is_hash_allowed(self, hashes):
"""
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)

0 comments on commit 190ea6a

Please sign in to comment.