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

Function get_preferred_scheme

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

Source from the content-addressed store, hash-verified

308
309
310def get_preferred_scheme(key):
311 if key == 'prefix' and sys.prefix != sys.base_prefix:
312 return 'venv'
313 scheme = _get_preferred_schemes()[key]
314 if scheme not in _INSTALL_SCHEMES:
315 raise ValueError(
316 f"{key!r} returned {scheme!r}, which is not a valid scheme "
317 f"on this platform"
318 )
319 return scheme
320
321
322def get_default_scheme():

Callers 1

get_default_schemeFunction · 0.85

Calls 1

_get_preferred_schemesFunction · 0.85

Tested by

no test coverage detected