stubber.utils ============= .. py:module:: stubber.utils Submodules ---------- .. toctree:: :maxdepth: 1 /api/stubber/utils/config/index /api/stubber/utils/makeversionhdr/index /api/stubber/utils/manifest/index /api/stubber/utils/post/index /api/stubber/utils/repos/index /api/stubber/utils/stubmaker/index /api/stubber/utils/typed_config_toml/index Functions --------- .. autoapisummary:: stubber.utils.make_manifest stubber.utils.manifest stubber.utils.do_post_processing stubber.utils.generate_pyi_files stubber.utils.generate_pyi_from_file Package Contents ---------------- .. py:function:: 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. .. py:function:: manifest(family: str = 'micropython', stubtype: str = 'frozen', machine: Optional[str] = None, port: Optional[str] = None, platform: Optional[str] = None, sysname: Optional[str] = None, nodename: Optional[str] = None, version: Optional[str] = None, release: Optional[str] = None, firmware: Optional[str] = None, board: Optional[str] = None) -> dict create a new empty manifest dict .. py:function:: do_post_processing(stub_paths: List[pathlib.Path], stubgen: bool, format: bool, autoflake: bool) Common post processing .. py:function:: 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 .. py:function:: generate_pyi_from_file(file: pathlib.Path) -> bool Generate a .pyi stubfile from a single .py module using mypy/stubgen