Module pdoc.test.example_pkg
Module docstring
Sub-modules
pdoc.test.example_pkg.index
-
Module docstring
pdoc.test.example_pkg.module
-
Module docstring
pdoc.test.example_pkg.subpkg
-
Module docstring
pdoc.test.example_pkg.subpkg2
-
Module docstring
Global variables
var CONST
-
CONST docstring
var foreign_var
-
foreign var docstring
var var
-
var docstring
Functions
def doctests(self)
-
Expand source code Browse git
def doctests(self): """ Need an intro paragrapgh. >>> Then code is indented one level line1 line2 Alternatively ``` >>> doctest fenced code works always ``` Examples: >>> nbytes(100) '100.0 bytes' line2 some text some text >>> another doctest line1 line2 Example: >>> f() Traceback (most recent call last): ... Exception: something went wrong """
Need an intro paragrapgh.
>>> Then code is indented one level line1 line2
Alternatively
>>> doctest fenced code works always
Examples
>>> nbytes(100) '100.0 bytes' line2
some text
some text
>>> another doctest line1 line2
Example
>>> f() Traceback (most recent call last): ... Exception: something went wrong
def foo(env=os.environ)
-
Expand source code Browse git
def foo(env=os.environ): """Doesn't leak environ"""
Doesn't leak environ
def google(self)
-
Expand source code Browse git
def google(self): """ Summary line. Nomatch: Args: arg1 (str, optional): Text1 arg2 (List[str], optional, default=10): Text2 data (array-like object): foo Args: arg1 (int): Description of arg1 arg2 (str or int): Description of arg2 arg3 (str | None): Description of arg3 test_sequence: 2-dim numpy array of real numbers, size: N * D - the test observation sequence. test_sequence = code Continue. *args: passed around Returns: issue_10: description didn't work across multiple lines if only a single item was listed. `inspect.cleandoc()` somehow stripped the required extra indentation. Returns: A very special number which is the answer of everything. Returns: Dict[int, pdoc.Doc]: Description. Returns: int | str: Description. Raises: AttributeError: The ``Raises`` section is a list of all exceptions that are relevant to the interface. and a third line. ValueError: If `arg2` is equal to `arg1`. Test a title without a blank line before it. Args: A: a Examples: Examples in doctest format. >>> a = [1,2,3] Todos: * For module TODOs """
Summary line. Nomatch:
Args
arg1
:str
, optional- Text1
arg2
:List[str]
, optional, default=10
- Text2
data
:array-like object
- foo
Args
arg1
:int
- Description of arg1
arg2
:str
orint
- Description of arg2
arg3
:str | None
- Description of arg3
test_sequence
-
2-dim numpy array of real numbers, size: N * D - the test observation sequence.
test_sequence = code
Continue.
*args
- passed around
Returns
issue_10
- description didn't work across multiple lines
if only a single item was listed.
inspect.cleandoc()
somehow stripped the required extra indentation.
Returns
A very special number which is the answer of everything.
Returns
Dict[int, Doc]
- Description.
Returns
int | str
- Description.
Raises
AttributeError
-
The
Raises
section is a list of all exceptions that are relevant to the interface.and a third line.
ValueError
- If
arg2
is equal toarg1
.
Test a title without a blank line before it.
Args
A
- a
Examples
Examples in doctest format.
>>> a = [1,2,3]
Todos
- For module TODOs
def latex_math()
-
Expand source code Browse git
def latex_math(): """ Inline equation: \\( v_t *\\frac{1}{2}* j_i + [a] < 3 \\). Block equation: \\[ v_t *\\frac{1}{2}* j_i + [a] < 3 \\] Block equation: $$ v_t *\\frac{1}{2}* j_i + [a] < 3 $$ $\\mathcal{O}(N)$ Escaping \\$ should work in math like $X = \\$3.25$ once it is implemented. ..math:: v_t *\\frac{1}{2}* j_i + [a] < 3 """
Inline equation: ( v_t \frac{1}{2} j_i + [a] < 3 ).
Block equation: [ v_t \frac{1}{2} j_i + [a] < 3 ]
Block equation: $$ v_t \frac{1}{2} j_i + [a] < 3 $$
$\mathcal{O}(N)$
Escaping \$ should work in math like $X = \$3.25$ once it is implemented.
[ v_t \frac{1}{2} j_i + [a] < 3 ]
def non_callable_routine(x)
-
Expand source code Browse git
non_callable_routine = staticmethod(lambda x: 2) # Not interpreted as Function; skipped
def numpy(self)
-
Expand source code Browse git
def numpy(self): """ Summary line. **Documentation**: https://pdoc3.github.io/pdoc/doc/pdoc/ **Source Code**: https://github.com/pdoc3/ Parameters ---------- x1, x2 : array_like Input arrays, description of `x1`, `x2`. .. versionadded:: 1.5.0 x : { NoneType, 'B', 'C' }, optional n : int or list of int Description of num *args, **kwargs Passed on. complex : Union[Set[pdoc.Doc, Function], pdoc] The `List[Doc]`s of the new signal. Returns ------- output : pdoc.Doc The output array List[pdoc.Doc] The output array foo Raises ------ TypeError When something. Raises ------ TypeError Returns ------- None. Invalid ------- no match See Also -------- fromstring, loadtxt See Also -------- pdoc.text : Function a with its description. scipy.random.norm : Random variates, PDFs, etc. pdoc.Doc : A class description that spans several lines. Examples -------- >>> doctest ... Notes ----- Foo bar. ### H3 Title Foo bar. """
Summary line.
Documentation: https://pdoc3.github.io/pdoc/doc/pdoc/ Source Code: https://github.com/pdoc3/
Parameters
x1
,x2
:array_like
-
Input arrays, description of
x1
,x2
.Added in version: 1.5.0
x
:{ NoneType, 'B', 'C' }
, optionaln
:int
orlist
ofint
- Description of num
*args
,**kwargs
- Passed on.
complex
:Union[Set[Doc, Function], pdoc]
- The
List[Doc]
s of the new signal.
Returns
Raises
TypeError
- When something.
Raises
TypeError
Returns
None.
Invalid
no match
See Also
fromstring
,loadtxt
See Also
text()
- Function a with its description.
scipy.random.norm
- Random variates, PDFs, etc.
Doc
- A class description that spans several lines.
Examples
>>> doctest ...
Notes
Foo bar.
H3 Title
Foo bar.
def object_as_arg_default(*args, a=<object object>, **kwargs)
-
Expand source code Browse git
def object_as_arg_default(*args, a=object(), **kwargs): """Html-encodes angle brackets in params"""
Html-encodes angle brackets in params
def reST_directives(self)
-
Expand source code Browse git
def reST_directives(self): """ .. todo:: Create something. .. admonition:: Example Image shows something. .. image:: https://www.debian.org/logos/openlogo-nd-100.png .. note:: Can only nest admonitions two levels. .. image:: https://www.debian.org/logos/openlogo-nd-100.png Now you know. .. warning:: Some warning lines. * Describe some func in a list across multiple lines: .. deprecated:: 3.1 Use `spam` instead. .. versionadded:: 2.5 The *spam* parameter. .. caution:: Don't touch this! """
TODO
Create something.
Example
Image shows something.
Note
Can only nest admonitions two levels.
Now you know.
Warning
Some warning lines.
-
Describe some func in a list across multiple lines:
Deprecated since version: 3.1
Use
spam
instead.Added in version: 2.5
The spam parameter.
Caution
Don't touch this!
-
Classes
class A
-
Expand source code Browse git
class A: """`A` is base class for `example_pkg.B`.""" # Test refname link def overridden(self): """A.overridden docstring""" def overridden_same_docstring(self): """A.overridden_same_docstring docstring""" def inherited(self): # Inherited in B """A.inherited docstring""" def __call__(self): """A.__call__ docstring. Only shown when whitelisted"""
A
is base class forexample_pkg.B
.Subclasses
Methods
def inherited(self)
-
Expand source code Browse git
def inherited(self): # Inherited in B """A.inherited docstring"""
A.inherited docstring
def overridden(self)
-
Expand source code Browse git
def overridden(self): """A.overridden docstring"""
A.overridden docstring
def overridden_same_docstring(self)
-
Expand source code Browse git
def overridden_same_docstring(self): """A.overridden_same_docstring docstring"""
A.overridden_same_docstring docstring
class B (x, y, z, w)
-
Expand source code Browse git
class B(A, int): """ B docstring External refs: `sys.version`, `sys` """ CONST = 2 """B.CONST docstring""" var = 3 """B.var docstring""" ro_value_descriptor = ReadOnlyValueDescriptor() """ro_value_descriptor docstring""" ro_value_descriptor_no_doc = ReadOnlyValueDescriptor() # no doc-string def __init__(self, x, y, z, w): """`__init__` docstring""" self.instance_var = None """instance var docstring""" self._private_instance_var = None """This should be private (hidden) despite PEP 224 docstring""" def f(self, a: int, b: int = 1, *args, c: str = 'c', **kwargs): """B.f docstring""" @staticmethod def static(x): """B.static docstring""" @classmethod def cls(cls): """B.cls docstring""" def _private(self): """B._private docstring""" @staticmethod def _private_static(): """B._private_static docstring""" @classmethod def _private_cls(cls): """B._private_cls docstring""" @property def p(self): """B.p docstring""" return 1 class C: """B.C docstring""" def f(self): """B.C.f docstring""" class _Private: """B._Private docstring""" def f(self): """B._Private.f docstring""" def overridden(self): pass assert overridden.__doc__ is None __pdoc__['B.overridden'] = 'B.overridden docstring' def overridden_same_docstring(self): pass
B docstring
External refs:
sys.version
,sys
__init__
docstringAncestors
- A
- builtins.int
Subclasses
Class variables
var C
-
B.C docstring
var CONST
-
B.CONST docstring
var var
-
B.var docstring
Static methods
def cls()
-
B.cls docstring
def static(x)
-
Expand source code Browse git
@staticmethod def static(x): """B.static docstring"""
B.static docstring
Instance variables
var instance_var
-
instance var docstring
prop p
-
Expand source code Browse git
@property def p(self): """B.p docstring""" return 1
B.p docstring
var ro_value_descriptor
-
Expand source code Browse git
def __get__(self, instance, instance_type=None): if instance is not None: return instance.var ** 2 return self
ro_value_descriptor docstring
var ro_value_descriptor_no_doc
-
Expand source code Browse git
def __get__(self, instance, instance_type=None): if instance is not None: return instance.var ** 2 return self
Read-only value descriptor
Methods
def f(self, a: int, b: int = 1, *args, c: str = 'c', **kwargs)
-
Expand source code Browse git
def f(self, a: int, b: int = 1, *args, c: str = 'c', **kwargs): """B.f docstring"""
B.f docstring
def overridden(self)
-
Expand source code Browse git
def overridden(self): pass
B.overridden docstring
Inherited members
class C (x, y, z, w)
-
Expand source code Browse git
class C(B): pass # noqa: E701, E302
B docstring
External refs:
sys.version
,sys
__init__
docstringAncestors
Subclasses
Inherited members
class D (x, y, z, w)
-
Expand source code Browse git
class D(C): pass # noqa: E701, E302
B docstring
External refs:
sys.version
,sys
__init__
docstringAncestors
Inherited members
class Docformats
-
Expand source code Browse git
class Docformats: def numpy(self): """ Summary line. **Documentation**: https://pdoc3.github.io/pdoc/doc/pdoc/ **Source Code**: https://github.com/pdoc3/ Parameters ---------- x1, x2 : array_like Input arrays, description of `x1`, `x2`. .. versionadded:: 1.5.0 x : { NoneType, 'B', 'C' }, optional n : int or list of int Description of num *args, **kwargs Passed on. complex : Union[Set[pdoc.Doc, Function], pdoc] The `List[Doc]`s of the new signal. Returns ------- output : pdoc.Doc The output array List[pdoc.Doc] The output array foo Raises ------ TypeError When something. Raises ------ TypeError Returns ------- None. Invalid ------- no match See Also -------- fromstring, loadtxt See Also -------- pdoc.text : Function a with its description. scipy.random.norm : Random variates, PDFs, etc. pdoc.Doc : A class description that spans several lines. Examples -------- >>> doctest ... Notes ----- Foo bar. ### H3 Title Foo bar. """ def google(self): """ Summary line. Nomatch: Args: arg1 (str, optional): Text1 arg2 (List[str], optional, default=10): Text2 data (array-like object): foo Args: arg1 (int): Description of arg1 arg2 (str or int): Description of arg2 arg3 (str | None): Description of arg3 test_sequence: 2-dim numpy array of real numbers, size: N * D - the test observation sequence. test_sequence = code Continue. *args: passed around Returns: issue_10: description didn't work across multiple lines if only a single item was listed. `inspect.cleandoc()` somehow stripped the required extra indentation. Returns: A very special number which is the answer of everything. Returns: Dict[int, pdoc.Doc]: Description. Returns: int | str: Description. Raises: AttributeError: The ``Raises`` section is a list of all exceptions that are relevant to the interface. and a third line. ValueError: If `arg2` is equal to `arg1`. Test a title without a blank line before it. Args: A: a Examples: Examples in doctest format. >>> a = [1,2,3] Todos: * For module TODOs """ def doctests(self): """ Need an intro paragrapgh. >>> Then code is indented one level line1 line2 Alternatively ``` >>> doctest fenced code works always ``` Examples: >>> nbytes(100) '100.0 bytes' line2 some text some text >>> another doctest line1 line2 Example: >>> f() Traceback (most recent call last): ... Exception: something went wrong """ def reST_directives(self): """ .. todo:: Create something. .. admonition:: Example Image shows something. .. image:: https://www.debian.org/logos/openlogo-nd-100.png .. note:: Can only nest admonitions two levels. .. image:: https://www.debian.org/logos/openlogo-nd-100.png Now you know. .. warning:: Some warning lines. * Describe some func in a list across multiple lines: .. deprecated:: 3.1 Use `spam` instead. .. versionadded:: 2.5 The *spam* parameter. .. caution:: Don't touch this! """
Methods
def doctests(self)
-
Expand source code Browse git
def doctests(self): """ Need an intro paragrapgh. >>> Then code is indented one level line1 line2 Alternatively ``` >>> doctest fenced code works always ``` Examples: >>> nbytes(100) '100.0 bytes' line2 some text some text >>> another doctest line1 line2 Example: >>> f() Traceback (most recent call last): ... Exception: something went wrong """
Need an intro paragrapgh.
>>> Then code is indented one level line1 line2
Alternatively
>>> doctest fenced code works always
Examples
>>> nbytes(100) '100.0 bytes' line2
some text
some text
>>> another doctest line1 line2
Example
>>> f() Traceback (most recent call last): ... Exception: something went wrong
def google(self)
-
Expand source code Browse git
def google(self): """ Summary line. Nomatch: Args: arg1 (str, optional): Text1 arg2 (List[str], optional, default=10): Text2 data (array-like object): foo Args: arg1 (int): Description of arg1 arg2 (str or int): Description of arg2 arg3 (str | None): Description of arg3 test_sequence: 2-dim numpy array of real numbers, size: N * D - the test observation sequence. test_sequence = code Continue. *args: passed around Returns: issue_10: description didn't work across multiple lines if only a single item was listed. `inspect.cleandoc()` somehow stripped the required extra indentation. Returns: A very special number which is the answer of everything. Returns: Dict[int, pdoc.Doc]: Description. Returns: int | str: Description. Raises: AttributeError: The ``Raises`` section is a list of all exceptions that are relevant to the interface. and a third line. ValueError: If `arg2` is equal to `arg1`. Test a title without a blank line before it. Args: A: a Examples: Examples in doctest format. >>> a = [1,2,3] Todos: * For module TODOs """
Summary line. Nomatch:
Args
arg1
:str
, optional- Text1
arg2
:List[str]
, optional, default=10
- Text2
data
:array-like object
- foo
Args
arg1
:int
- Description of arg1
arg2
:str
orint
- Description of arg2
arg3
:str | None
- Description of arg3
test_sequence
-
2-dim numpy array of real numbers, size: N * D - the test observation sequence.
test_sequence = code
Continue.
*args
- passed around
Returns
issue_10
- description didn't work across multiple lines
if only a single item was listed.
inspect.cleandoc()
somehow stripped the required extra indentation.
Returns
A very special number which is the answer of everything.
Returns
Dict[int, Doc]
- Description.
Returns
int | str
- Description.
Raises
AttributeError
-
The
Raises
section is a list of all exceptions that are relevant to the interface.and a third line.
ValueError
- If
arg2
is equal toarg1
.
Test a title without a blank line before it.
Args
A
- a
Examples
Examples in doctest format.
>>> a = [1,2,3]
Todos
- For module TODOs
def numpy(self)
-
Expand source code Browse git
def numpy(self): """ Summary line. **Documentation**: https://pdoc3.github.io/pdoc/doc/pdoc/ **Source Code**: https://github.com/pdoc3/ Parameters ---------- x1, x2 : array_like Input arrays, description of `x1`, `x2`. .. versionadded:: 1.5.0 x : { NoneType, 'B', 'C' }, optional n : int or list of int Description of num *args, **kwargs Passed on. complex : Union[Set[pdoc.Doc, Function], pdoc] The `List[Doc]`s of the new signal. Returns ------- output : pdoc.Doc The output array List[pdoc.Doc] The output array foo Raises ------ TypeError When something. Raises ------ TypeError Returns ------- None. Invalid ------- no match See Also -------- fromstring, loadtxt See Also -------- pdoc.text : Function a with its description. scipy.random.norm : Random variates, PDFs, etc. pdoc.Doc : A class description that spans several lines. Examples -------- >>> doctest ... Notes ----- Foo bar. ### H3 Title Foo bar. """
Summary line.
Documentation: https://pdoc3.github.io/pdoc/doc/pdoc/ Source Code: https://github.com/pdoc3/
Parameters
x1
,x2
:array_like
-
Input arrays, description of
x1
,x2
.Added in version: 1.5.0
x
:{ NoneType, 'B', 'C' }
, optionaln
:int
orlist
ofint
- Description of num
*args
,**kwargs
- Passed on.
complex
:Union[Set[Doc, Function], pdoc]
- The
List[Doc]
s of the new signal.
Returns
Raises
TypeError
- When something.
Raises
TypeError
Returns
None.
Invalid
no match
See Also
fromstring
,loadtxt
See Also
text()
- Function a with its description.
scipy.random.norm
- Random variates, PDFs, etc.
Doc
- A class description that spans several lines.
Examples
>>> doctest ...
Notes
Foo bar.
H3 Title
Foo bar.
def reST_directives(self)
-
Expand source code Browse git
def reST_directives(self): """ .. todo:: Create something. .. admonition:: Example Image shows something. .. image:: https://www.debian.org/logos/openlogo-nd-100.png .. note:: Can only nest admonitions two levels. .. image:: https://www.debian.org/logos/openlogo-nd-100.png Now you know. .. warning:: Some warning lines. * Describe some func in a list across multiple lines: .. deprecated:: 3.1 Use `spam` instead. .. versionadded:: 2.5 The *spam* parameter. .. caution:: Don't touch this! """
TODO
Create something.
Example
Image shows something.
Note
Can only nest admonitions two levels.
Now you know.
Warning
Some warning lines.
-
Describe some func in a list across multiple lines:
Deprecated since version: 3.1
Use
spam
instead.Added in version: 2.5
The spam parameter.
Caution
Don't touch this!
-
class HasMockAttributes
-
Expand source code Browse git
class HasMockAttributes: """ Test class containing instances of `unittest.mock.Mock`. """ function_mock = Mock(spec=_func_spec) coroutine_mock = AsyncMock(spec=_coro_spec)
Test class containing instances of
unittest.mock.Mock
.Class variables
var coroutine_mock
var function_mock
class Location (lat, lon)
-
Expand source code Browse git
class Location(namedtuple('Location', 'lat lon')): """Geo-location, GPS position."""
Geo-location, GPS position.
Ancestors
- builtins.tuple
class ReadOnlyValueDescriptor
-
Expand source code Browse git
def __get__(self, instance, instance_type=None): if instance is not None: return instance.var ** 2 return self
Read-only value descriptor