We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0baec60 commit 190ea6aCopy full SHA for 190ea6a
setup.cfg
@@ -53,9 +53,6 @@ strict_optional = False
53
[mypy-pip/_internal/models/format_control]
54
strict_optional = False
55
56
-[mypy-pip/_internal/models/link]
57
-strict_optional = False
58
-
59
[mypy-pip/_internal/operations/check]
60
61
src/pip/_internal/models/link.py
@@ -206,5 +206,8 @@ def is_hash_allowed(self, hashes):
206
"""
207
if not self.has_hash:
208
return False
209
+ # Assert non-None so mypy knows self.hash_name and self.hash are str.
210
+ assert self.hash_name is not None
211
+ assert self.hash is not None
212
213
return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
0 commit comments