MCPcopy
hub / github.com/pallets/jinja / visit

Method visit

src/jinja2/visitor.py:35–42  ·  src/jinja2/visitor.py::NodeVisitor.visit

Visit a node.

(self, node: Node, *args: t.Any, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

33 return getattr(self, fclass="st">"visit_{type(node).__name__}", None)
34
35 def visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:
36 class="st">""class="st">"Visit a node."class="st">""
37 f = self.get_visitor(node)
38
39 if f is not None:
40 return f(node, *args, **kwargs)
41
42 return self.generic_visit(node, *args, **kwargs)
43
44 def generic_visit(self, node: Node, *args: t.Any, **kwargs: t.Any) -> t.Any:
45 class="st">""class="st">"Called if no explicit visitor function exists for a node."class="st">""

Callers 15

generic_visitMethod · 0.95
optimizeFunction · 0.80
new_funcFunction · 0.80
visitorFunction · 0.80
generateFunction · 0.80
find_undeclaredFunction · 0.80
blockvisitMethod · 0.80
signatureMethod · 0.80
pull_dependenciesMethod · 0.80
macro_bodyMethod · 0.80
visit_ExtendsMethod · 0.80

Calls 2

get_visitorMethod · 0.95
generic_visitMethod · 0.95

Tested by

no test coverage detected