genpydoc.commenter package

Submodules

genpydoc.commenter.commenter module

class genpydoc.commenter.commenter.Commenter(config: Config)

Bases: object

MODELS_MAPPING: dict = {'openai': 'gpt-5-nano'}
build_class_prompt(node: CovNode) str
build_function_prompt(node: CovNode) str
build_prompt(node: CovNode) str
async comment(nodes: list[CovNode]) dict[str, str]
document(nodes: dict[str, list[CovNode]]) None
async openai_process(prompt: str, node_name: str, responses: dict[str, str]) None
async process_prompt(prompt: str, node_name: str, responses: dict[str, str]) None
async process_prompts(prompts: dict[str, str]) dict[str, str]

genpydoc.commenter.transformer module

class genpydoc.commenter.transformer.Parser(config: Config)

Bases: object

post_process(filepath: str | Path, cleanup: bool = True, convert: bool = True) None
process(filepath: Path, comments: dict[str, str]) None
class genpydoc.commenter.transformer.Transformer(config: Config, comments: dict[str, str])

Bases: NodeTransformer

comments: dict[str, str]
config: Config
visit_AsyncFunctionDef(node: AsyncFunctionDef | FunctionDef | ClassDef) AsyncFunctionDef | FunctionDef | ClassDef
visit_ClassDef(node: AsyncFunctionDef | FunctionDef | ClassDef) AsyncFunctionDef | FunctionDef | ClassDef
visit_FunctionDef(node: AsyncFunctionDef | FunctionDef | ClassDef) AsyncFunctionDef | FunctionDef | ClassDef