class documentation

class PartialVisitor(Visitor[T]): (source)

Known subclasses: pydoctor.astutils.NodeVisitor

Constructor: PartialVisitor(extensions)

View In Hierarchy

Visitor class that do not have to define all possible visit_.* methods since it overrides the default behaviour of unknown_visit() and unknown_departure() not to raise NotImplementedError.

Method unknown_departure Called before exiting unknown object types.
Method unknown_visit Called when entering unknown object types.

Inherited from Visitor:

Exception IgnoreNode Comletely stop visiting the current node, extensions will not be run on that node.
Exception SkipChildren Do not visit any children of the current node. The current node's siblings and depart_... method are not affected.
Exception SkipNode Do not visit the current node's children, and do not call the current node's depart_... method. The extensions will still be called.
Class Method get_children Undocumented
Method __init__ Undocumented
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 _TreePruningException Base class for Visitor-related tree pruning exceptions.
Instance Variable _skipped_nodes Undocumented
def unknown_departure(self, ob: T): (source)

Called before exiting unknown object types.

Raise exception unless overridden.

def unknown_visit(self, ob: T): (source)

Called when entering unknown object types.

Raise an exception unless overridden.