MCPcopy Index your code
hub / github.com/RustPython/RustPython / _get_pip_version

Function _get_pip_version

Lib/ensurepip/__init__.py:53–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def _get_pip_version():
54 with _get_pip_whl_path_ctx() as bundled_wheel_path:
55 wheel_name = bundled_wheel_path.name
56 return (
57 # Extract '21.2.4' from 'pip-21.2.4-py3-none-any.whl'
58 wheel_name.
59 removeprefix('pip-').
60 partition('-')[0]
61 )
62
63
64def _run_pip(args, additional_paths=None):

Callers 1

versionFunction · 0.85

Calls 3

_get_pip_whl_path_ctxFunction · 0.85
partitionMethod · 0.45
removeprefixMethod · 0.45

Tested by

no test coverage detected