MCPcopy
hub / github.com/pex-tool/pex / _find_implementation

Method _find_implementation

pex/interpreter.py:408–422  ·  view source on GitHub ↗
(
        cls,
        python_tag,  # type: str
        free_threaded,  # type: Optional[bool]
        version,  # type: Tuple[int, int, int]
    )

Source from the content-addressed store, hash-verified

406
407 @classmethod
408 def _find_implementation(
409 cls,
410 python_tag, # type: str
411 free_threaded, # type: Optional[bool]
412 version, # type: Tuple[int, int, int]
413 ):
414 # type: (...) -> InterpreterImplementation.Value
415 for implementation in InterpreterImplementation.values():
416 if (
417 implementation.applies(version)
418 and python_tag.startswith(implementation.abbr)
419 and (implementation.free_threaded == free_threaded)
420 ):
421 return implementation
422 raise ValueError("Unknown interpreter: {}".format(python_tag))
423
424 def __init__(
425 self,

Callers 1

__init__Method · 0.95

Calls 2

valuesMethod · 0.45
appliesMethod · 0.45

Tested by

no test coverage detected