pydocmk2.loader
pydocmk2.loader
This module provides implementations to load documentation information from an identifier as it is specified in the `pydocmk.yml:generate` configuration key. A loader basically takes care of loading the documentation content for that name, but is not supposed to apply preprocessing.
Modules
- collections
- inspect
- types
- uuid
Classes
class Parameter(builtin.object)
Methods
- init(self, kind, name, annotation=None, default=None)
- repr(self)
- str(self)
- replace(self, name=<object object>, annotation=<object object>, default=<object object>, kind=<object object>)
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Attributes
- KWONLY = 'KWONLY'
- POS = 'POS'
- VARARGS_KW = 'VARARGS_KW'
- VARARGS_POS = 'VARARGS_POS'
- Value = <class 'pydocmk2.loader.Value'>
-
Value(value,)
class PythonLoader(builtin.object)
Expects absolute identifiers to import with #import_object_with_scope().
Methods
- init(self, config)
- load_section(self, section)
-
Loads the contents of a #Section. The `section.identifier` is the name of the object that we need to load. # Arguments section (Section): The section to load. Fill the `section.title` and `section.content` values. Optionally, `section.loader_context` can be filled with custom arbitrary data to reference at a later point.
Descriptors
- dict
-
dictionary for instance variables (if defined)
- weakref
-
list of weak references to the object (if defined)
Functions
- format_parameters_list(parameters)
- get_docstring(function)
- get_full_arg_spec(func)
- get_function_signature(function, owner_class=None, strip_self_param=False, show_module=False, pretty=True)
- get_paramaters_from_arg_spec(argspec, strip_self=False)
- trim(docstring)
PythonLoader
pydocmk2.loader.PythonLoader = class PythonLoader(__builtin__.object)
Expects absolute identifiers to import with #import_object_with_scope().
Methods
- __init__(self, config)
- load_section(self, section)
-
Loads the contents of a #Section. The `section.identifier` is the name of the object that we need to load. # Arguments section (Section): The section to load. Fill the `section.title` and `section.content` values. Optionally, `section.loader_context` can be filled with custom arbitrary data to reference at a later point.
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
load_section
- pydocmk2.loader.PythonLoader.load_section = load_section(self, section) unbound pydocmk2.loader.PythonLoader method
-
Loads the contents of a #Section. The `section.identifier` is the name of the object that we need to load. # Arguments section (Section): The section to load. Fill the `section.title` and `section.content` values. Optionally, `section.loader_context` can be filled with custom arbitrary data to reference at a later point.
Parameter
pydocmk2.loader.Parameter = class Parameter(__builtin__.object)
Methods
- __init__(self, kind, name, annotation=None, default=None)
- __repr__(self)
- __str__(self)
- replace(self, name=<object object>, annotation=<object object>, default=<object object>, kind=<object object>)
Descriptors
- __dict__
-
dictionary for instance variables (if defined)
- __weakref__
-
list of weak references to the object (if defined)
Attributes
- KWONLY = 'KWONLY'
- POS = 'POS'
- VARARGS_KW = 'VARARGS_KW'
- VARARGS_POS = 'VARARGS_POS'
- Value = <class 'pydocmk2.loader.Value'>
-
Value(value,)
KWONLY
pydocmk2.loader.Parameter.KWONLY = 'KWONLY'
POS
pydocmk2.loader.Parameter.POS = 'POS'
Value
pydocmk2.loader.Parameter.Value = class Value(__builtin__.tuple)
Value(value,)
- Method resolution order:
- Value
- __builtin__.tuple
- __builtin__.object
Methods
- __getnewargs__(self)
-
Return self as a plain tuple. Used by copy and pickle.
- __getstate__(self)
-
Exclude the OrderedDict from pickling
- __repr__(self)
-
Return a nicely formatted representation string
- _asdict(self)
-
Return a new OrderedDict which maps field names to their values
- _replace(_self, **kwds)
-
Return a new Value object replacing specified fields with new values
Class methods
- _make(cls, iterable, new=<built-in method __new__ of type object>, len=<built-in function len>) from __builtin__.type
-
Make a new Value object from a sequence or iterable
Static methods
- __new__(_cls, value)
-
Create new instance of Value(value,)
Descriptors
- __dict__
-
Return a new OrderedDict which maps field names to their values
- value
-
Alias for field number 0
Attributes
- _fields = ('value',)
Methods from __builtin__.tuple
- __contains__(...)
-
x.__contains__(y) <==> y in x
- __getattribute__(...)
-
x.__getattribute__('name') <==> x.name
- __getitem__(...)
-
x.__getitem__(y) <==> x[y]
- __getslice__(...)
-
x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.
VARARGS_KW
pydocmk2.loader.Parameter.VARARGS_KW = 'VARARGS_KW'
VARARGS_POS
pydocmk2.loader.Parameter.VARARGS_POS = 'VARARGS_POS'