preProcessing
parse_docstring(docstring:str)
Parse a Google-style Python docstring into a structured dictionary. Recognized sections include: Args, Returns, Raises, Examples, Notes, See Also, Caution, and Warning.
Parameters:
docstring
(str): A raw docstring from a Python function.
Returns:
'labels'
: list of str,Examples:
>>> doc = '''
... Adds two numbers.
... Args:
... a (int): First number.
... b (int): Second number.
... Returns:
... int: Sum of the numbers.
... '''
>>> parse_python_docstring(doc)
Labels:
src_PyThon_Docy_preProcessing_parse_docstring
generate_html(obj:dict, indent:int)
Generate indented HTML for a docString function or class’s documentation.
Parameters:
obj
(dict): A dictionary representing a Python function or class with its docstring.indent
(int): The indentation level for the HTML output.
Returns:
str
: The generated HTML string.Labels:
src_PyThon_Docy_preProcessing_generate_html