Low-level infrastructure to find modules. This builds on fscache.py; find_sources.py builds on top of this.
Class |
|
A single source file. |
Class |
|
Helper to efficiently test a file's membership in a set of build sources. |
Class |
|
Module finder with integrated cache. |
Class |
|
Undocumented |
Class |
|
Undocumented |
Function | compute |
Compute the search paths as specified in PEP 561. |
Function | default |
Return default standard library search paths. |
Function | get |
Find package directories for given python. |
Function | highest |
Compute the highest level where an __init__ file is found. |
Function | is |
Undocumented |
Function | load |
Return dict with minimum and maximum Python versions of stdlib modules. |
Function | matches |
Undocumented |
Function | mypy |
Undocumented |
Function | parse |
Undocumented |
Function | typeshed |
Return Python version used for checking whether module supports typeshed. |
Function | verify |
Check that all packages containing id have a __init__ file. |
Constant | PYTHON |
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
Type Alias |
|
Undocumented |
list[ BuildSource]
, options: Options
, data_dir: str
, alt_lib_path: str|None
= None) -> SearchPaths
:
(source)
¶
Compute the search paths as specified in PEP 561. There are the following 4 members created: - User code (from `sources`) - MYPYPATH (set either via config or environment variable) - installed package directories (which will later be split into stub-only and inline) - typeshed
str
, pyversion: tuple[ int, int]
, custom_typeshed_dir: str|None
) -> list[ str]
:
(source)
¶
Return default standard library search paths.
def get_search_dirs(python_executable:
str|None
) -> tuple[ list[ str], list[ str]]
:
(source)
¶
Find package directories for given python. This runs a subprocess call, which generates a list of the directories in sys.path. To avoid repeatedly calling a subprocess (which can be slow!) we lru_cache the results.
FileSystemCache
, id: str
, path: str
, prefix: str
) -> int
:
(source)
¶
Compute the highest level where an __init__ file is found.
Return dict with minimum and maximum Python versions of stdlib modules. The contents look like {..., 'secrets': ((3, 6), None), 'symbol': ((2, 7), (3, 9)), ...} None means there is no maximum version.
str
, excludes: list[ str]
, fscache: FileSystemCache
, verbose: bool
) -> bool
:
(source)
¶
Undocumented