MCPcopy Index your code
hub / github.com/python/cpython / get_preferred_scheme

Function get_preferred_scheme

Lib/sysconfig/__init__.py:299–308  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

297
298
299def get_preferred_scheme(key):
300 if key == 'prefix' and sys.prefix != sys.base_prefix:
301 return 'venv'
302 scheme = _get_preferred_schemes()[key]
303 if scheme not in _INSTALL_SCHEMES:
304 raise ValueError(
305 f"{key!r} returned {scheme!r}, which is not a valid scheme "
306 f"on this platform"
307 )
308 return scheme
309
310
311def get_default_scheme():

Callers 1

get_default_schemeFunction · 0.85

Calls 1

_get_preferred_schemesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…