Set the environment for all nodes.
(self, environment: "Environment")
| 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): |
no test coverage detected