MCPcopy Index your code
hub / github.com/python/mypy / getsitepackages

Function getsitepackages

mypy/pyinfo.py:28–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def getsitepackages() -> list[str]:
29 res = []
30 if hasattr(site, "getsitepackages"):
31 res.extend(site.getsitepackages())
32
33 if hasattr(site, "getusersitepackages") and site.ENABLE_USER_SITE:
34 res.insert(0, site.getusersitepackages())
35 else:
36 res = [sysconfig.get_paths()["purelib"]]
37 return res
38
39
40def getsyspath() -> list[str]:

Callers 1

getsearchdirsFunction · 0.85

Calls 3

hasattrFunction · 0.85
extendMethod · 0.80
insertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…