stubber.stubs_from_docs

Read the Micropython library documentation files and use them to build stubs that can be used for static typechecking using a custom-built parser to read and process the micropython RST files

Module Contents

Functions

generate_from_rst(→ int)

clean_destination(dst_path)

Remove all .py/.pyi files in desination folder to avoid left-behinds

get_rst_sources(→ List[pathlib.Path])

Get the list of rst files to process

make_docstubs(dst_path, v_tag, release, suffix, files)

Create the docstubs

stubber.stubs_from_docs.generate_from_rst(rst_path: pathlib.Path, dst_path: pathlib.Path, v_tag: str, release: str | None = None, pattern: str = '*.rst', suffix: str = '.py', black: bool = True) int
Parameters:
Return type:

int

stubber.stubs_from_docs.clean_destination(dst_path: pathlib.Path)

Remove all .py/.pyi files in desination folder to avoid left-behinds

Parameters:

dst_path (pathlib.Path) –

stubber.stubs_from_docs.get_rst_sources(rst_path: pathlib.Path, pattern: str) List[pathlib.Path]

Get the list of rst files to process

Parameters:
Return type:

List[pathlib.Path]

stubber.stubs_from_docs.make_docstubs(dst_path: pathlib.Path, v_tag: str, release: str, suffix: str, files: List[pathlib.Path])

Create the docstubs

Parameters: