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¶
|
|
|
Remove all .py/.pyi files in desination folder to avoid left-behinds |
|
Get the list of rst files to process |
|
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:
rst_path (pathlib.Path) –
dst_path (pathlib.Path) –
v_tag (str) –
release (Optional[str]) –
pattern (str) –
suffix (str) –
black (bool) –
- Return type:
- 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:
rst_path (pathlib.Path) –
pattern (str) –
- 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:
dst_path (pathlib.Path) –
v_tag (str) –
release (str) –
suffix (str) –
files (List[pathlib.Path]) –