class ModuleVistor(NodeVisitor): (source)
Undocumented
Method | __init__ |
Undocumented |
Method | depart_ |
Undocumented |
Method | depart_ |
Undocumented |
Method | depart_ |
Undocumented |
Method | depart_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Method | visit_ |
Process an import statement. |
Method | visit_ |
Undocumented |
Method | visit_ |
Undocumented |
Instance Variable | builder |
Undocumented |
Instance Variable | module |
Undocumented |
Instance Variable | system |
Undocumented |
Method | _annotations |
Get annotations from a function definition. |
Method | _get |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Must be called after obj.setLineNumber() to have the right line number in the warning. |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Move re-exported objects into current module. |
Method | _import |
Handle a from <modname> import * statement. |
Method | _import |
Handle a from <modname> import <names> statement. |
Method | _warns |
Undocumented |
Method | _warns |
Undocumented |
Inherited from NodeVisitor
:
Class Method | get |
Returns the nested nodes in the body of a node. |
Method | generic |
Helper method to visit a node by calling visit() on each child of the node. This is useful because this vistitor only visits statements inside .body attribute. |
Inherited from PartialVisitor
(via NodeVisitor
):
Method | unknown |
Called before exiting unknown object types. |
Method | unknown |
Called when entering unknown object types. |
Inherited from Visitor
(via NodeVisitor
, PartialVisitor
):
Exception |
|
Do not visit any children of the current node. The current node's siblings and depart_... method are not affected. |
Exception |
|
Do not call the current node's depart_... method. The current node's children and siblings are not affected. |
Exception |
|
Do not visit the current node's children, and do not call the current node's depart_... method. |
Exception |
|
Do not visit any more siblings (to the right) of the current node. The current node's children and its depart_... method are not affected. |
Method | depart |
Extend the base depart with extensions. |
Method | visit |
Extend the base visit with extensions. |
Method | walk |
Traverse a tree of objects, calling the visit() method of visitor when entering each node. (The walkabout() method is similar, except it also calls the depart() method before exiting each objects.) |
Method | walkabout |
Perform a tree traversal similarly to walk() (which see), except also call the depart() method before exiting each node. |
Instance Variable | extensions |
Undocumented |
Exception | _ |
Base class for Visitor -related tree pruning exceptions. |
pydoctor.visitor.Visitor.__init__
Undocumented
Parameters | |
builder:ASTBuilder | Undocumented |
module:model.Module | Undocumented |
Process an import statement.
The grammar for the statement is roughly:
mod_as := DOTTEDNAME ['as' NAME] import_stmt := 'import' mod_as (',' mod_as)*
and this is translated into a node which is an instance of Import wih an attribute 'names', which is in turn a list of 2-tuples (dotted_name, as_name) where as_name is None if there was no 'as foo' part of the statement.
Parameters | |
node:ast.Import | Undocumented |
Get annotations from a function definition.
Parameters | |
func:Union[ | The function definition's AST. |
Returns | |
Mapping[ | Mapping from argument name to annotation. The name return is used for the return type. Unannotated arguments are omitted. |
Must be called after obj.setLineNumber() to have the right line number in the warning.
Parameters | |
obj:model.Attribute | Undocumented |
value:Optional[ | Undocumented |
lineno:int | Undocumented |
Undocumented
Parameters | |
node:Union[ | Undocumented |
isbool | Undocumented |
Undocumented
Parameters | |
node:Union[ | Undocumented |
docstring:Optional[ | Undocumented |
lineno:int | Undocumented |
Returns | |
model.Attribute | Undocumented |
Move re-exported objects into current module.
Parameters | |
currCollection[ | Undocumented |
originstr | Undocumented |
asstr | Undocumented |
originmodel.Module | Undocumented |
Returns | |
bool | True if the imported name has been sucessfully re-exported. |