Skip to content

Commit d4274db

Browse files
committed
Simplify assertion
1 parent 540f8fb commit d4274db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/models/link.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class LinkHash:
6767
)
6868

6969
def __post_init__(self) -> None:
70-
assert self._hash_url_fragment_re.match(f"#{self.name}={self.value}")
70+
assert self.name in _SUPPORTED_HASHES
7171

7272
@classmethod
7373
def parse_pep658_hash(cls, dist_info_metadata: str) -> Optional["LinkHash"]:

0 commit comments

Comments
 (0)