Set the line numbers of the node and children.
(self, lineno, override=False)
| 206 | return self |
| 207 | |
| 208 | def set_lineno(self, lineno, override=False): |
| 209 | """Set the line numbers of the node and children.""" |
| 210 | todo = deque([self]) |
| 211 | while todo: |
| 212 | node = todo.popleft() |
| 213 | if 'lineno' in node.attributes: |
| 214 | if node.lineno is None or override: |
| 215 | node.lineno = lineno |
| 216 | todo.extend(node.iter_child_nodes()) |
| 217 | return self |
| 218 | |
| 219 | def set_environment(self, environment): |
| 220 | """Set the environment for all nodes.""" |
no test coverage detected