MCPcopy
hub / github.com/jazzband/pip-tools / key_from_ireq

Function key_from_ireq

piptools/utils.py:61–66  ·  view source on GitHub ↗

Get a standardized key for an InstallRequirement.

(ireq: InstallRequirement)

Source from the content-addressed store, hash-verified

59
60
61def key_from_ireq(ireq: InstallRequirement) -> str:
62 """Get a standardized key for an InstallRequirement."""
63 if ireq.req is None and ireq.link is not None:
64 return str(ireq.link)
65 else:
66 return key_from_req(ireq.req)
67
68
69def key_from_req(req: InstallRequirement | Requirement | PipRequirement) -> str:

Callers 15

test_no_upgradesFunction · 0.90
find_best_matchMethod · 0.90
_comes_from_as_stringFunction · 0.85
_sort_keyMethod · 0.85
_iter_linesMethod · 0.85
as_tupleFunction · 0.85
mergeFunction · 0.85
diff_key_from_ireqFunction · 0.85
__init__Method · 0.85

Calls 1

key_from_reqFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…