fml_doc_gen.read_user_function¶
Functions¶
|
Reads the source code of the user-provided function and extracts its signature and existing docstring (if any). |
Module Contents¶
- fml_doc_gen.read_user_function.read_user_function(func: Callable) fml_doc_gen.func_dto.FunctionDTO[source]¶
Reads the source code of the user-provided function and extracts its signature and existing docstring (if any).
- Parameters:
func (Callable) – The user-defined function.
- Returns:
The function signature as a FunctionDTO object.
- Return type:
- Raises:
TypeError – If func is not a callable object.
Examples
>>> def example_func(a, b): ... return a + b ... >>> sigDTO = read_user_function(example_func)