stubber.utils.post ================== .. py:module:: stubber.utils.post .. autoapi-nested-parse:: Pre/Post Processing for createstubs.py Functions --------- .. autoapisummary:: stubber.utils.post.do_post_processing stubber.utils.post.format_stubs stubber.utils.post.run_autoflake Module Contents --------------- .. py:function:: do_post_processing(stub_paths: List[pathlib.Path], stubgen: bool, format: bool, autoflake: bool) Common post processing .. py:function:: format_stubs(path: pathlib.Path, capture_output: bool = False) run ruff format to format the code / stubs .. py:function:: run_autoflake(path: pathlib.Path, capture_output: bool = False, process_pyi: bool = False) run autoflake to remove unused imports needs to be run BEFORE ruff format otherwise it does not recognize long import from`s. note: is run file-by-file to include processing .pyi files