stubber.freeze.get_frozen
¶
Collect modules and python stubs from MicroPython source projects (v1.12 +) and stores them in the all_stubs folder The all_stubs folder should be mapped/symlinked to the micropython_stubs/stubs repo/folder
Module Contents¶
Functions¶
|
Returns a list of all manifests.py files found in the ports folder of the MicroPython repo |
|
Add a comment to the top of each file in the path |
|
Get and parse the to-be-frozen .py modules for micropython to extract the static type information |
|
Attributes¶
- stubber.freeze.get_frozen.FAMILY = 'micropython'¶
- stubber.freeze.get_frozen.get_manifests(mpy_path: pathlib.Path) List[pathlib.Path] ¶
Returns a list of all manifests.py files found in the ports folder of the MicroPython repo
- Parameters:
mpy_path (pathlib.Path) –
- Return type:
List[pathlib.Path]
- stubber.freeze.get_frozen.add_comment_to_path(path: pathlib.Path, comment: str) None ¶
Add a comment to the top of each file in the path using a codemod
- Parameters:
path (pathlib.Path) –
comment (str) –
- Return type:
None
- stubber.freeze.get_frozen.freeze_any(stub_folder: pathlib.Path | None = None, version: str = V_PREVIEW, mpy_path: pathlib.Path | None = None, mpy_lib_path: pathlib.Path | None = None) pathlib.Path ¶
- Get and parse the to-be-frozen .py modules for micropython to extract the static type information
requires that the MicroPython and Micropython-lib repos are checked out and available on a local path
repos should be cloned side-by-side as some of the manifests refer to micropython-lib scripts using a relative path
The micropython-* repos must be checked out to the required version/tag.
- Parameters:
stub_folder (Optional[pathlib.Path]) –
version (str) –
mpy_path (Optional[pathlib.Path]) –
mpy_lib_path (Optional[pathlib.Path]) –
- Return type:
- stubber.freeze.get_frozen.get_fsp(version: str, stub_folder: pathlib.Path | None = None) pathlib.Path ¶
- Parameters:
version (str) –
stub_folder (Optional[pathlib.Path]) –
- Return type: