stubber.utils
¶
Submodules¶
Package Contents¶
Functions¶
|
Create a module.json manifest listing all files/stubs in this folder and subfolders. |
Create a module.json manifest listing all files/stubs in this folder and subfolders. |
|
|
Common post processing |
|
Generate typeshed files for all scripts in a folder using mypy/stubgen |
|
Generate a .pyi stubfile from a single .py module using mypy/stubgen |
|
Get the checked-out version of the repo |
|
Clean up and transform the many flavours of versions |
- stubber.utils.make_manifest(folder: pathlib.Path, family: str, port: str, version: str, release: str = '', stubtype: str = '', board: str = '') bool ¶
Create a module.json manifest listing all files/stubs in this folder and subfolders.
- stubber.utils.manifest(family: str = 'micropython', stubtype: str = 'frozen', machine: str | None = None, port: str | None = None, platform: str | None = None, sysname: str | None = None, nodename: str | None = None, version: str | None = None, release: str | None = None, firmware: str | None = None) dict ¶
create a new empty manifest dict
- stubber.utils.do_post_processing(stub_paths: List[pathlib.Path], stubgen: bool, black: bool, autoflake: bool)¶
Common post processing
- Parameters:
stub_paths (List[pathlib.Path]) –
stubgen (bool) –
black (bool) –
autoflake (bool) –
- stubber.utils.generate_pyi_files(modules_folder: pathlib.Path) bool ¶
Generate typeshed files for all scripts in a folder using mypy/stubgen
Returns: False if one or more files had an issue generating a stub
- Parameters:
modules_folder (pathlib.Path) –
- Return type:
- stubber.utils.generate_pyi_from_file(file: pathlib.Path) bool ¶
Generate a .pyi stubfile from a single .py module using mypy/stubgen
- Parameters:
file (pathlib.Path) –
- Return type:
- stubber.utils.checkedout_version(path: pathlib.Path, flat: bool = False) str ¶
Get the checked-out version of the repo
- Parameters:
path (pathlib.Path) –
flat (bool) –
- Return type: