MCPcopy Create free account
hub / github.com/pytorch/executorch / get_function_docstring

Function get_function_docstring

backends/arm/scripts/docgen/docgen.py:58–60  ·  view source on GitHub ↗

Returns a function's signature and docstring formatted in markdown.

(cls, func)

Source from the content-addressed store, hash-verified

56
57
58def get_function_docstring(cls, func) -> str:
59 """Returns a function's signature and docstring formatted in markdown."""
60 return f"```python\ndef {cls.__name__}.{func.__name__}{inspect.signature(func)}:\n```\n{get_docstring(func)}\n\n"
61
62
63def get_class_docstring(cls, filter_funcs=()) -> str:

Callers 1

get_class_docstringFunction · 0.85

Calls 1

get_docstringFunction · 0.85

Tested by

no test coverage detected