Skip to content

Commit

Permalink
fix: Link is not defined if not TYPE_CHECKING but it's used
Browse files Browse the repository at this point in the history
Fixes #2151

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Aug 7, 2023
1 parent a123487 commit a6bcdf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pdm/models/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def _find_best_match_link(
# In this case, the requirement must be pinned, so no need to pass allow_prereleases
# If links are not empty, find the best match from the links, otherwise find from
# the package sources.
from unearth import Link

links = [Link(f["url"]) for f in files if "url" in f]
hashes = convert_hashes(files)

Expand Down

0 comments on commit a6bcdf0

Please sign in to comment.