class documentation

Represents a module, basically a named container for code/API objects. Modules may be nested in other modules.

Method __init__ Undocumented
Method __repr__ Undocumented
Class Variable members The members of the API object.
Class Variable parent The parent of the API object.
Instance Variable dunder_all The module variable __all__ as list of string.
Instance Variable is_c_module Whether this module has been imported from a python C extension.
Instance Variable is_package Whether this module is a package.
Instance Variable source_path Module source path. None if the module was converted from docspec.
Method _init_attribs A method to define extra attributes that will be set after initialization.
Class Variable _spec_fields Undocumented
Instance Variable _ast The whole module's AST. Can be used in post-processes to compute any kind of supplementary informations not devirable from objects attributes.
Instance Variable _py_mod The live module this object has been created from. None for classes coming from AST.
Instance Variable _py_string The module's string. Only set for modules built from string. None otherwise.

Inherited from HasMembers (via Module):

Method sync_hierarchy Synchronize the hierarchy of this API object and all of it's children. This should be called when the #HasMembers.members are updated to ensure that all child objects reference the right #parent. Loaders are expected to return #ApiObject#s in a fully synchronized state such that the user does not have to call this method unless they are doing modifications to the tree.

Inherited from ApiObject (via Module, HasMembers):

Instance Variable docstring The documentation string of the API object.
Instance Variable location The location of the API object, i.e. where it is sourced from/defined in the code.
Instance Variable name The name of the entity. This is usually relative to the respective parent of the entity, as opposed to it's fully qualified name/absolute name. However, that is more of a recommendation than rule. For example the #docspec_python loader by default returns #Module objects with their full module name (and does not create a module hierarchy).
Property path Returns a list of all of this API object's parents, from top to bottom. The list includes self as the last item.

Inherited from ApiObject:

Method __str__ Undocumented
Method add_siblings A new nodes to the tree, siblings to this node.
Method get_member Retrieve a member from the API object. This will always return None for objects that don't support members (eg. Function and Variable).
Method get_members Like get_member but can return several items with the same name.
Method remove Undocumented
Method replace Replace this object by one or more objects.
Method walk Traverse a tree of objects, calling the genericvisitor.Visitor.visit method of visitor when entering each node.
Method walkabout Perform a tree traversal similarly to walk(), except also call the genericvisitor.Visitor.depart method before exiting each node.
Instance Variable root TreeRoot instance holding references to all objects in the tree.
Property dotted_name The fully qualified dotted name of this object, as DottedName instance.
Property full_name The fully qualified dotted name of this object, as string. This value is used as the key in the ApiObject.root.all_objects dictionnary.
Property module Undocumented
Property scope Undocumented
Method _members Undocumented
Method _remove_self Undocumented
Method _repr Undocumented

Inherited from ApiObject (via ApiObject):

Method sync_hierarchy Synchronize the hierarchy of this API object and all of it's children. This should be called when the #HasMembers.members are updated to ensure that all child objects reference the right #parent. Loaders are expected to return #ApiObject#s in a fully synchronized state such that the user does not have to call this method unless they are doing modifications to the tree.
Instance Variable docstring The documentation string of the API object.
Instance Variable location The location of the API object, i.e. where it is sourced from/defined in the code.
Instance Variable name The name of the entity. This is usually relative to the respective parent of the entity, as opposed to it's fully qualified name/absolute name. However, that is more of a recommendation than rule. For example the #docspec_python loader by default returns #Module objects with their full module name (and does not create a module hierarchy).
Property path Returns a list of all of this API object's parents, from top to bottom. The list includes self as the last item.

Inherited from CanTriggerWarnings (via ApiObject):

Method warn Undocumented

Inherited from GetMembersMixin (via ApiObject):

Method __getitem__ Undocumented
def __init__(self, *args, is_package=False, is_c_module=False, source_path=None, _py_mod=None, _py_string=None, **kwargs): (source)
overridden in pydocspec.Module

Undocumented

Parameters
*args:AnyUndocumented
is_package:boolUndocumented
is_c_module:boolUndocumented
source_path:Optional[Path]Undocumented
_py_mod:Optional[types.ModuleType]Undocumented
_py_string:Optional[str]Undocumented
**kwargs:AnyUndocumented
def __repr__(self): (source)

Undocumented

Returns
strUndocumented
overridden in pydocspec.Module

The members of the API object.

overridden in pydocspec.Module

The parent of the API object.

dunder_all: Optional[List[str]] = (source)

The module variable __all__ as list of string.

is_c_module: bool = (source)

Whether this module has been imported from a python C extension.

is_package: bool = (source)

Whether this module is a package.

source_path: Optional[Path] = (source)

Module source path. None if the module was converted from docspec.

def _init_attribs(self): (source)
overridden in pydocspec.Module

A method to define extra attributes that will be set after initialization.

Note
Most attributes don't need a special value at initialization (if they use None as default for instance), in those cases, avoid overriding this method by declaring them as class variable. Override this method only if you have to initialize an attribute value to a mutable object.
_spec_fields = (source)
_ast: Optional[astroid.nodes.Module] = (source)

The whole module's AST. Can be used in post-processes to compute any kind of supplementary informations not devirable from objects attributes.

Only set when using our own astbuilder. None if the module was converted from docspec.

The live module this object has been created from. None for classes coming from AST.

_py_string: Optional[str] = (source)

The module's string. Only set for modules built from string. None otherwise.