EpydocParser
Bases: AbstractDocstringParser
Parses documentation in the Epydoc format. See http://epydoc.sourceforge.net/epytext.html for more information.
This class is not thread-safe. Each thread should create its own instance.
Source code in src/library_analyzer/processing/api/docstring_parsing/_epydoc_parser.py
__cached_docstring: DocstringParam | None = None
instance-attribute
¶
__cached_function_node: astroid.FunctionDef | None = None
instance-attribute
¶
__get_cached_function_numpydoc_string(function_node, docstring)
¶
Return the NumpyDocString for the given function node.
It is only recomputed when the function node differs from the previous one that was passed to this function. This avoids reparsing the docstring for the function itself and all of its parameters.
On Lars's system this caused a significant performance improvement: Previously, 8.382s were spent inside the function get_parameter_documentation when parsing sklearn. Afterwards, it was only 2.113s.