7.3.2.1.7. DispatcherDocumenter¶
-
class
DispatcherDocumenter
(directive, name, indent='')[source]¶ Specialized Documenter subclass for dispatchers.
Methods
__init__
Initialize self. add_content
Add content from docstrings, attribute documentation and user. add_directive_header
Add the directive header and options to the generated content. add_line
Append one line of generated reST to the output. can_document_member
Called to see if a member can be documented by this documenter. check_module
Check if self.object is really defined in the module given by self.modname. document_members
Generate reST for member documentation. filter_members
Filter the given member list. format_args
Format the argument signature of self.object. format_name
Format the name of self.object. format_signature
Format the signature (arguments and return annotation) of the object. generate
Generate reST for the object given by self.name, and possibly for its members. get_attr
getattr() override for types such as Zope interfaces. get_doc
Decode and return lines of the docstring(s) for the object. get_object_members
Return (members_check_module, members) where members is a list of (membername, member) pairs of the members of self.object. get_real_modname
Get the real module name of an object to document. get_sourcename
import_object
Import the object given by self.modname and self.objpath and set it as self.object. parse_name
Determine what module to import and what attribute to document. process_doc
Let the user process the docstrings before adding them. resolve_name
Resolve the module and name of the object to document given by the arguments and the current module/class. -
__init__
(directive, name, indent='')¶ Initialize self. See help(type(self)) for accurate signature.
Attributes
blue_cache
code
content_indent
default_opt
directivetype
documenters
Returns registered Documenter classes is_doctest
member_order
objtype
option_spec
priority
titles_allowed
-
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
()[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.
-