Docstring module of the psyplot package
We use the docrep package for managing our docstrings
Classes:
|
A |
Functions:
|
Return an iterator that append the docstring of the given parent function to the applied function |
|
Dedent the docstring of a function and substitute with |
|
Indet the given string |
Data:
|
- class psyplot.docstring.PsyplotDocstringProcessor(*args, **kwargs)[source]
Bases:
DocstringProcessor
A
docrep.DocstringProcessor
subclass with possible types section- Parameters:
*args – Positional parameters that shall be used for the substitution. Note that you can only provide either
*args
or**kwargs
, furthermore most of the methods like get_sections require**kwargs
to be provided (if any).**kwargs – Initial parameters to use
Methods:
get_sections
([s, base, sections])Extract the specified sections out of the given string
Attributes:
sections that behave the same as the Parameter section by defining a list
- get_sections(s=None, base=None, sections=['Parameters', 'Other Parameters', 'Possible types'])[source]
Extract the specified sections out of the given string
The same as the
docrep.DocstringProcessor.get_sections()
method but uses the'Possible types'
section by default, too- Parameters:
- Returns:
The replaced string
- Return type:
- param_like_sections = ['Parameters', 'Other Parameters', 'Returns', 'Raises', 'Possible types']
sections that behave the same as the Parameter section by defining a list
- psyplot.docstring.append_original_doc(parent, num=0)[source]
Return an iterator that append the docstring of the given parent function to the applied function
- psyplot.docstring.dedent(func)[source]
Dedent the docstring of a function and substitute with
params
- Parameters:
func (function) – function with the documentation to dedent
- psyplot.docstring.docstrings(s) = <psyplot.docstring.PsyplotDocstringProcessor object>
docrep.PsyplotDocstringProcessor
instance that simplifies the reuse of docstrings from between different python objects.