class documentation

class NapoelonDocstringParser:

View In Hierarchy

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__
Method parse​_google​_docstring Parse the given docstring, which is formatted as Google style docstring. Return a ParsedDocstring representation of its contents.
Method parse​_numpy​_docstring Parse the given docstring, which is formatted as NumPy style docstring. Return a ParsedDocstring representation of its contents.
Instance Variable obj Undocumented
Static Method ​_parse​_docstring​_obj Helper method to parse GoogleDocstring or NumpyDocstring objects.
Method ​_parse​_docstring Undocumented
def __init__(self, obj=None):
Parameters
obj:Optional[Documentable]Documentable object we're parsing the docstring for.
def parse_google_docstring(self, docstring, errors, processtypes=True):
Parse the given docstring, which is formatted as Google style docstring. Return a ParsedDocstring representation of its contents.
Parameters
docstring:strThe docstring to parse
errors:List[ParseError]A list where any errors generated during parsing will be stored.
processtypes:boolUndocumented
Returns
ParsedDocstringUndocumented
def parse_numpy_docstring(self, docstring, errors, processtypes=True):
Parse the given docstring, which is formatted as NumPy style docstring. Return a ParsedDocstring representation of its contents.
Parameters
docstring:strThe docstring to parse
errors:List[ParseError]A list where any errors generated during parsing will be stored.
processtypes:boolprocesstypes is always ``True`` for google and numpy docstrings.
Returns
ParsedDocstringUndocumented
obj =

Undocumented

@staticmethod
def _parse_docstring_obj(docstring_obj, errors):
Helper method to parse GoogleDocstring or NumpyDocstring objects.
Parameters
docstring​_obj:GoogleDocstringUndocumented
errors:List[ParseError]Undocumented
Returns
ParsedDocstringUndocumented
def _parse_docstring(self, docstring, errors, docstring_cls):

Undocumented

Parameters
docstring:strUndocumented
errors:List[ParseError]Undocumented
docstring​_cls:Type[GoogleDocstring]Undocumented
Returns
ParsedDocstringUndocumented