Skip to content

Commit

Permalink
Fix deprecated usage of poetry.core.packages.utils.link.Link
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Oct 29, 2024
1 parent 028a842 commit 379df51
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions conda_lock/pypi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,7 @@ def _get_url(link: Link) -> str:

def _compute_hash(link: Link, lock_spec_hash: Optional[str]) -> HashModel:
if lock_spec_hash is None:
hashes: Dict[str, str] = {}
if link.hash_name is not None and link.hash is not None:
hashes[link.hash_name] = link.hash
hashes: Dict[str, str] = dict(link.hashes)
return HashModel.model_validate(hashes)
else:
# A hash was provided in the lock spec, so that takes precedence
Expand Down

0 comments on commit 379df51

Please sign in to comment.