class GoogleDocstring:
Known subclasses: sphinx.ext.napoleon.docstring.NumpyDocstring
Convert Google style docstrings to reStructuredText.
str
or list
of str
sphinx.ext.napoleon.Config
or sphinx.config.Config
app
; or if app
is not given defaults to the
a new sphinx.ext.napoleon.Config
object.sphinx.application.Sphinx
, optionalstr
, optionalstr
, optionalsphinx.ext.autodoc.Options
, optional>>> from sphinx.ext.napoleon import Config >>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True) >>> docstring = '''One line summary. ... ... Extended description. ... ... Args: ... arg1(int): Description of `arg1` ... arg2(str): Description of `arg2` ... Returns: ... str: Description of return value. ... ''' >>> print(GoogleDocstring(docstring, config)) One line summary. <BLANKLINE> Extended description. <BLANKLINE> :param arg1: Description of `arg1` :type arg1: int :param arg2: Description of `arg2` :type arg2: str <BLANKLINE> :returns: Description of return value. :rtype: str <BLANKLINE>
Method | __init__ |
Undocumented |
Method | __str__ |
Return the parsed docstring in reStructuredText format. |
Method | _consume_contiguous |
Undocumented |
Method | _consume_empty |
Undocumented |
Method | _consume_field |
Undocumented |
Method | _consume_fields |
Undocumented |
Method | _consume_indented_block |
Undocumented |
Method | _consume_inline_attribute |
Undocumented |
Method | _consume_returns_section |
Undocumented |
Method | _consume_section_header |
Undocumented |
Method | _consume_to_end |
Undocumented |
Method | _consume_to_next_section |
Undocumented |
Method | _consume_usage_section |
Undocumented |
Method | _dedent |
Undocumented |
Method | _escape_args_and_kwargs |
Undocumented |
Method | _fix_field_desc |
Undocumented |
Method | _format_admonition |
Undocumented |
Method | _format_block |
Undocumented |
Method | _format_docutils_params |
Undocumented |
Method | _format_field |
Undocumented |
Method | _format_fields |
Undocumented |
Method | _get_current_indent |
Undocumented |
Method | _get_indent |
Undocumented |
Method | _get_initial_indent |
Undocumented |
Method | _get_min_indent |
Undocumented |
Method | _indent |
Undocumented |
Method | _is_indented |
Undocumented |
Method | _is_list |
Undocumented |
Method | _is_section_break |
Undocumented |
Method | _is_section_header |
Undocumented |
Method | _load_custom_sections |
Undocumented |
Method | _lookup_annotation |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse_admonition |
Undocumented |
Method | _parse_attribute_docstring |
Undocumented |
Method | _parse_attributes_section |
Undocumented |
Method | _parse_custom_generic_section |
Undocumented |
Method | _parse_custom_params_style_section |
Undocumented |
Method | _parse_custom_returns_style_section |
Undocumented |
Method | _parse_examples_section |
Undocumented |
Method | _parse_generic_section |
Undocumented |
Method | _parse_keyword_arguments_section |
Undocumented |
Method | _parse_methods_section |
Undocumented |
Method | _parse_notes_section |
Undocumented |
Method | _parse_other_parameters_section |
Undocumented |
Method | _parse_parameters_section |
Undocumented |
Method | _parse_raises_section |
Undocumented |
Method | _parse_receives_section |
Undocumented |
Method | _parse_references_section |
Undocumented |
Method | _parse_returns_section |
Undocumented |
Method | _parse_see_also_section |
Undocumented |
Method | _parse_usage_section |
Undocumented |
Method | _parse_warns_section |
Undocumented |
Method | _parse_yields_section |
Undocumented |
Method | _partition_field_on_colon |
Undocumented |
Method | _qualify_name |
Undocumented |
Method | _strip_empty |
Undocumented |
Method | lines |
Return the parsed lines of the docstring in reStructuredText format. |
Class Variable | _name_rgx |
Undocumented |
Instance Variable | _annotations |
Undocumented |
Instance Variable | _app |
Undocumented |
Instance Variable | _config |
Undocumented |
Instance Variable | _directive_sections |
Undocumented |
Instance Variable | _is_in_section |
Undocumented |
Instance Variable | _line_iter |
Undocumented |
Instance Variable | _name |
Undocumented |
Instance Variable | _obj |
Undocumented |
Instance Variable | _opt |
Undocumented |
Instance Variable | _parsed_lines |
Undocumented |
Instance Variable | _section_indent |
Undocumented |
Instance Variable | _sections |
Undocumented |
Instance Variable | _what |
Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Parameters | |
docstring:Union[ | Undocumented |
config:SphinxConfig | Undocumented |
app:Sphinx | Undocumented |
what:str | Undocumented |
name:str | Undocumented |
obj:Any | Undocumented |
options:Any | Undocumented |
Return the parsed docstring in reStructuredText format.
Returns | |
str | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Parameters | |
parse_type:bool | Undocumented |
prefer_type:bool | Undocumented |
Returns | |
Tuple[ | Undocumented |
Undocumented
Parameters | |
parse_type:bool | Undocumented |
prefer_type:bool | Undocumented |
multiple:bool | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
indent:int | Undocumented |
Returns | |
List[ | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Parameters | |
preprocess_types:bool | Undocumented |
Returns | |
List[ | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Returns | |
str | Undocumented |
Undocumented
Parameters | |
lines:List[ | Undocumented |
full:bool | Undocumented |
Returns | |
List[ | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Parameters | |
name:str | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
desc:List[ | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
admonition:str | Undocumented |
lines:List[ | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
prefix:str | Undocumented |
lines:List[ | Undocumented |
padding:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
fields:List[ | Undocumented |
field_role:str | Undocumented |
type_role:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
_name:str | Undocumented |
_type:str | Undocumented |
_desc:List[ | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
field_type:str | Undocumented |
fields:List[ | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
peek_ahead:int | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Parameters | |
lines:List[ | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Parameters | |
lines:List[ | Undocumented |
Returns | |
int | Undocumented |
Undocumented
Parameters | |
lines:List[ | Undocumented |
n:int | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
line:str | Undocumented |
indent:int | Undocumented |
Returns | |
bool | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Returns | |
bool | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Returns | |
bool | Undocumented |
Undocumented
Parameters | |
_name:str | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
admonition:str | Undocumented |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
use_admonition:bool | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
section:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
line:str | Undocumented |
Returns | |
Tuple[ | Undocumented |
Undocumented
Parameters | |
attr_name:str | Undocumented |
klass:Type | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
lines:List[ | Undocumented |
Returns | |
List[ | Undocumented |
Return the parsed lines of the docstring in reStructuredText format.
Returns | |
List[ | Undocumented |
List[ str]
=
sphinx.ext.napoleon.docstring.NumpyDocstring
Undocumented