class ModuleVistor(NodeVisitor): (source)
Constructor: ModuleVistor(builder, module)
Undocumented
| Method | __init__ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | depart_ |
Undocumented |
| Method | override |
Returns a context manager that will make the builder ignore any new assigments to existing names within the same context. Currently used to visit If.orelse and Try.handlers. |
| Method | visit_ |
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 |
| Class Method | _handle |
Undocumented |
| Static Method | _set |
Undocumented |
| Static Method | _store |
Undocumented |
| Static Method | _tweak |
Undocumented |
| Method | _annotations |
Get annotations from a function definition. |
| Method | _contextualize |
Find out the documentatble wich is the parent of the assignment's target as well as it's name. |
| Method | _get |
Undocumented |
| Method | _get |
Undocumented |
| Method | _handle |
No summary |
| Method | _handle |
Process doc-comments and inline docstrings of the given assignment. |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Process the doc-comments, this is very similar to the inline docstrings. |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Process the inline docstrings |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _handle |
Move re-exported objects into current module. |
| Method | _ignore |
Should this name be ignored because it matches the override guard in the context of ob? |
| Method | _import |
Handle a from <modname> import * statement. |
| Method | _import |
Handle a from <modname> import <names> statement. |
| Method | _infer |
Undocumented |
| Method | _tweak |
Undocumented |
| Instance Variable | _override |
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 | |
Comletely stop visiting the current node, extensions will not be run on that node. |
| Exception | |
Do not visit any children of the current node. The current node's siblings and depart_... method are not affected. |
| Exception | |
Do not visit the current node's children, and do not call the current node's depart_... method. The extensions will still be called. |
| Method | depart |
Extend the base depart with extensions. |
| Method | visit |
Extend the base visit with extensions. |
| Method | walkabout |
Perform a tree traversal, calling visit() method when entering a node and the depart() method before exiting each node. |
| Instance Variable | extensions |
Undocumented |
| Exception | _ |
Base class for Visitor-related tree pruning exceptions. |
| Instance Variable | _skipped |
Undocumented |
Returns a context manager that will make the builder ignore any new assigments to existing names within the same context. Currently used to visit If.orelse and Try.handlers.
| Note | |
| The list of existing names is generated at the moment of calling the function, such that new names defined inside these blocks follows the usual override rules. |
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.
model.Attribute, annotation: ast.expr | None, value: ast.expr | None, lineno: int, defaultKind: model.DocumentableKind):
(source)
¶
Undocumented
Undocumented
model.Attribute, new_value: ast.expr | None, augassign: ast.operator | None = None):
(source)
¶
Undocumented
ast.AsyncFunctionDef | ast.FunctionDef) -> Mapping[ str, ast.expr | None]:
(source)
¶
Get annotations from a function definition.
| Parameters | |
func:ast.AsyncFunctionDef | ast.FunctionDef | 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 still included with a None value. |
Find out the documentatble wich is the parent of the assignment's target as well as it's name.
| Returns | |
tuple[ | Tuple parent, name. |
| Raises | |
ValueError | if the target does not bind a new variable. |
ast.expr, annotation: ast.expr | None, expr: ast.expr | None, lineno: int, augassign: ast.operator | None = None):
(source)
¶
| Raises | |
IgnoreAssignment | If the assignemnt should not be further processed. |
str, annotation: ast.expr | None, expr: ast.expr | None, lineno: int, augassign: ast.operator | None):
(source)
¶
Undocumented
str, annotation: ast.expr | None, expr: ast.expr | None, lineno: int, augassign: ast.operator | None):
(source)
¶
Undocumented
str, annotation: ast.expr | None, expr: ast.expr | None, lineno: int, augassign: ast.operator | None):
(source)
¶
Undocumented
ast.expr, expr: ast.expr | None, lineno: int):
(source)
¶
Undocumented
ast.AsyncFunctionDef | ast.FunctionDef, is_async: bool):
(source)
¶
Undocumented
str, annotation: ast.expr | None, expr: ast.expr | None, lineno: int):
(source)
¶
Undocumented
str, annotation: ast.expr | None, expr: ast.expr | None, lineno: int, augassign: ast.operator | None):
(source)
¶
Undocumented
ast.AsyncFunctionDef | ast.FunctionDef, doc_node: Str | None, lineno: int) -> model.Attribute:
(source)
¶
Undocumented
Collection[ str], origin_name: str, as_name: str, origin_module: model.Module) -> bool:
(source)
¶
Move re-exported objects into current module.
| Returns | |
bool | True if the imported name has been sucessfully re-exported. |