class documentation
class NapoelonDocstringParser: (source)
Constructor: NapoelonDocstringParser(objclass)
Parse google-style or numpy-style docstrings.
First wrap the pydoctor.napoleon converter classes, then call pydoctor.epydoc.markup.restructuredtext.parse_docstring with the converted reStructuredText docstring.
If the Documentable instance is an Attribute, the docstring will be parsed differently.
| Method | __init__ |
No summary |
| Method | parse |
Parse the given docstring, which is formatted as Google style docstring. Return a ParsedDocstring representation of its contents. |
| Method | parse |
Parse the given docstring, which is formatted as NumPy style docstring. Return a ParsedDocstring representation of its contents. |
| Instance Variable | objclass |
Undocumented |
| Static Method | _parse |
Helper method to parse GoogleDocstring or NumpyDocstring objects. |
| Method | _parse |
Undocumented |
def parse_google_docstring(self, docstring:
str, errors: list[ ParseError]) -> ParsedDocstring:
(source)
¶
Parse the given docstring, which is formatted as Google style docstring. Return a ParsedDocstring representation of its contents.
| Parameters | |
docstring:str | The docstring to parse |
errors:list[ | A list where any errors generated during parsing will be stored. |
| Returns | |
ParsedDocstring | Undocumented |
def parse_numpy_docstring(self, docstring:
str, errors: list[ ParseError]) -> ParsedDocstring:
(source)
¶
Parse the given docstring, which is formatted as NumPy style docstring. Return a ParsedDocstring representation of its contents.
| Parameters | |
docstring:str | The docstring to parse |
errors:list[ | A list where any errors generated during parsing will be stored. |
| Returns | |
ParsedDocstring | Undocumented |
def _parse_docstring_obj(docstring_obj:
GoogleDocstring, errors: list[ ParseError]) -> ParsedDocstring:
(source)
¶
Helper method to parse GoogleDocstring or NumpyDocstring objects.
def _parse_docstring(self, docstring:
str, errors: list[ ParseError], docstring_cls: type[ GoogleDocstring]) -> ParsedDocstring:
(source)
¶
Undocumented