Package pdoc_test
pdoc-test
Expand source code
""" pdoc-test """
# version information
__version__ = '0.0.1'
# Add the public API by importing just the API symbols from ._internal.XXX
from typing import Callable
from ._internal.interface import MyInterface
from ._internal.sample import MY_VAR, my_function
MyType = Callable[[str], str]
"""My function type"""
__all__ = ['MyInterface', 'MY_VAR', 'my_function', 'MyType']
Functions
def my_function(iface: pdoc_test._internal.interface.MyInterface) ‑> str-
My function doc
Args
iface- interface parameter doc
Returns
return value doc
Expand source code
def my_function(iface: MyInterface) -> str: """My function doc Args: iface: interface parameter doc Returns: return value doc """ return ''
Classes
class MyType (*args, **kwds)-
Callable type; Callable[[int], str] is a function of (int) -> str.
The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types or ellipsis; the return type must be a single type.
There is no syntax to indicate optional or keyword arguments, such function types are rarely used as callback types.
Expand source code
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta): """Callable type; Callable[[int], str] is a function of (int) -> str. The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types or ellipsis; the return type must be a single type. There is no syntax to indicate optional or keyword arguments, such function types are rarely used as callback types. """ __slots__ = () def __new__(cls, *args, **kwds): if cls._gorg is Callable: raise TypeError("Type Callable cannot be instantiated; " "use a non-abstract subclass instead") return _generic_new(cls.__next_in_mro__, cls, *args, **kwds)Ancestors
- typing.Callable
- collections.abc.Callable
class MyInterface-
This is my interface
Expand source code
class MyInterface(ABC): """This is my interface""" passAncestors
- abc.ABC