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

Method set_environment

src/jinja2/nodes.py:231–238  ·  view source on GitHub ↗

Set the environment for all nodes.

(self, environment: "Environment")

Source from the content-addressed store, hash-verified

229 return self
230
231 def set_environment(self, environment: "Environment") -> "Node":
232 """Set the environment for all nodes."""
233 todo = deque([self])
234 while todo:
235 node = todo.popleft()
236 node.environment = environment
237 todo.extend(node.iter_child_nodes())
238 return self
239
240 def __eq__(self, other: t.Any) -> bool:
241 if type(self) is not type(other):

Callers 2

compile_expressionMethod · 0.80
parseMethod · 0.80

Calls 2

extendMethod · 0.80
iter_child_nodesMethod · 0.80

Tested by

no test coverage detected