docstrings ¤
This module exposes objects related to docstrings.
Modules:
-
dataclasses
–This module contains the dataclasses related to docstrings.
-
google
–This module defines functions to parse Google-style docstrings into structured data.
-
numpy
–This module defines functions to parse Numpy-style docstrings into structured data.
-
parsers
–This module imports all the defined parsers.
-
sphinx
–This module defines functions to parse Sphinx docstrings into structured data.
-
utils
–This module contains utilities for docstrings parsers.
Classes:
-
Parser
–Enumeration of the different docstring parsers.
Functions:
-
parse
–Parse the docstring.
Parser ¤
flowchart TD
griffe.docstrings.Parser[Parser]
click griffe.docstrings.Parser href "" "griffe.docstrings.Parser"
Enumeration of the different docstring parsers.
Attributes:
parse ¤
parse(
docstring: Docstring,
parser: (
Literal["google", "numpy", "sphinx"] | Parser | None
),
**options: Any
) -> list[DocstringSection]
Parse the docstring.
Parameters:
-
docstring
(Docstring
) –The docstring to parse.
-
parser
(Literal['google', 'numpy', 'sphinx'] | Parser | None
) –The docstring parser to use. If None, return a single text section.
-
**options
(Any
, default:{}
) –The options accepted by the parser.
Returns:
-
list[DocstringSection]
–A list of docstring sections.