Skip to content

Commit c7daa07

Browse files
committed
Reword the check for no hashes
1 parent a0976d8 commit c7daa07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pip/_internal/models/link.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def supported_hashes(hashes: Optional[Dict[str, str]]) -> Optional[Dict[str, str
112112
if hashes is None:
113113
return None
114114
hashes = {n: v for n, v in hashes.items() if n in _SUPPORTED_HASHES}
115-
if len(hashes) > 0:
116-
return hashes
117-
return None
115+
if not hashes:
116+
return None
117+
return hashes
118118

119119

120120
def _clean_url_path_part(part: str) -> str:

0 commit comments

Comments
 (0)