MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / is_constraint_pinned

Function is_constraint_pinned

src/packagedcode/conan.py:273–278  ·  view source on GitHub ↗

Checks if a constraint is pinned and it specifies an exact version.

(constraint)

Source from the content-addressed store, hash-verified

271
272
273def is_constraint_pinned(constraint):
274 """
275 Checks if a constraint is pinned and it specifies an exact version.
276 """
277 range_characters = {">", "<", "[", "]", ">=", "<="}
278 return not any(char in range_characters for char in constraint)
279
280
281def get_dependencies(requires):

Callers 1

get_dependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected