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
Functions¶
|
|
|
Remove all .py/.pyi files in desination folder to avoid left-behinds |
|
Get the list of rst files to process |
|
Create docstubs from the list of rst files |
|
Create a docstub from a single rst file |
Module Contents¶
- 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 = '.pyi', format: bool = True, autoflake: bool = True, clean_rst: bool = True) int¶
- Parameters:
rst_path (pathlib.Path)
dst_path (pathlib.Path)
v_tag (str)
release (Optional[str])
pattern (str)
suffix (str)
format (bool)
autoflake (bool)
clean_rst (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], clean_rst: bool)¶
Create docstubs from the list of rst files
- Parameters:
dst_path (pathlib.Path)
v_tag (str)
release (str)
suffix (str)
files (List[pathlib.Path])
clean_rst (bool)
- stubber.stubs_from_docs.make_docstub(file: pathlib.Path, dst_path: pathlib.Path, v_tag: str, release: str, suffix: str, clean_rst: bool)¶
Create a docstub from a single rst file
- Parameters:
file (pathlib.Path)
dst_path (pathlib.Path)
v_tag (str)
release (str)
suffix (str)
clean_rst (bool)