8.3.2.1.16. DispatcherDocumenter¶
- class DispatcherDocumenter(directive: DocumenterBridge, name: str, indent: str = '')[source]¶
Specialized Documenter subclass for dispatchers.
Methods
__delattr__Implement delattr(self, name).
__dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__init_subclass__This method is called when a class is subclassed.
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__new____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_call_format_args_generateAdd content from docstrings, attribute documentation and user.
Add the directive header and options to the generated content.
add_lineAppend one line of generated reST to the output.
Called to see if a member can be documented by this Documenter.
check_moduleCheck if self.object is really defined in the module given by self.modname.
document_membersGenerate reST for member documentation.
filter_membersFilter the given member list.
format_argsFormat the argument signature of self.object.
format_nameFormat the name of self.object.
Format the signature (arguments and return annotation) of the object.
Generate reST for the object given by self.name, and possibly for its members.
get_attrgetattr() override for types such as Zope interfaces.
get_docDecode and return lines of the docstring(s) for the object.
get_module_commentget_object_membersReturn (members_check_module, members) where members is a list of (membername, member) pairs of the members of self.object.
Get the real module name of an object to document.
get_sourcenameImport the object given by self.modname and self.objpath and set it as self.object.
Determine what module to import and what attribute to document.
process_docLet the user process the docstrings before adding them.
resolve_nameResolve the module and name of the object to document given by the arguments and the current module/class.
should_suppress_directive_headerCheck directive header should be suppressed.
should_suppress_value_headerCheck :value: header should be suppressed.
sort_membersSort the given member list.
update_annotationsUpdate __annotations__ to support type_comment and so on.
update_contentUpdate docstring, for example with TypeVar variance.
Attributes
__dict____weakref__list of weak references to the object
indentation by which to indent the directive content
documentersReturns registered Documenter classes
member_orderorder if autodoc_member_order is set to 'groupwise'
name by which the directive is called (auto...) and the default generated directive name
prioritypriority if multiple documenters return True from can_document_member
titles_allowedtrue if the generated content may contain titles
- content_indent = ''¶
indentation by which to indent the directive content
- objtype = 'dispatcher'¶
name by which the directive is called (auto…) and the default generated directive name
- directivetype = 'data'¶
- option_spec: ClassVar[OptionSpec] = {'annotation': <function annotation_option>, 'code': <function bool_option>, 'data': <function bool_option>, 'description': <function bool_option>, 'dsp': <function bool_option>, 'func': <function bool_option>, 'height': <function length_or_unitless>, 'no-index': <function bool_option>, 'no-index-entry': <function bool_option>, 'no-value': <function bool_option>, 'noindex': <function bool_option>, 'opt': <function _dsp2dot_option>, 'width': <function length_or_percentage_or_unitless>}¶
- default_opt = {'depth': 0, 'view': False}¶
- code = None¶
- is_doctest = False¶
- blue_cache = {}¶
- get_real_modname()[source]¶
Get the real module name of an object to document.
It can differ from the name of the module through which the object was imported.
- classmethod can_document_member(member, *args, **kwargs)[source]¶
Called to see if a member can be documented by this Documenter.
- parse_name()[source]¶
Determine what module to import and what attribute to document.
Returns True and sets self.modname, self.objpath, self.fullname, self.args and self.retann if parsing and resolving was successful.
- generate(more_content=None, **kw)[source]¶
Generate reST for the object given by self.name, and possibly for its members.
If more_content is given, include that content. If real_modname is given, use that module name to find attribute docs. If check_module is True, only generate if the object is defined in the module name it is imported from. If all_members is True, document all members.
- import_object(*args, **kwargs)[source]¶
Import the object given by self.modname and self.objpath and set it as self.object.
Returns True if successful, False if an error occurred.
- format_signature()[source]¶
Format the signature (arguments and return annotation) of the object.
Let the user process it via the
autodoc-process-signatureevent.
- add_content(more_content, no_docstring=False)[source]¶
Add content from docstrings, attribute documentation and user.
- __annotations__ = {'_current_document': '_CurrentDocument', '_events': 'EventManager', 'analyzer': 'ModuleAnalyzer | None', 'args': 'str | None', 'config': 'Config', 'env': 'BuildEnvironment', 'modname': 'str', 'module': 'ModuleType | None', 'object': 'Any', 'objpath': 'list[str]', 'option_spec': 'ClassVar[OptionSpec]', 'parent': 'Any', 'retann': 'str'}¶
- __doc__ = '\n Specialized Documenter subclass for dispatchers.\n '¶
- __module__ = 'schedula.ext.dispatcher.documenter'¶
- env: BuildEnvironment¶
- parent: Any¶
- object: Any¶
- _current_document: _CurrentDocument¶
- _events: EventManager¶