Outputs a source code string that, if converted back to an ast (using ast.parse) will generate an AST equivalent to *node*
(self, node)
| 187 | # NodeVisitor.generic_visit to handle any nodes (as it calls back in to |
| 188 | # the subclass visit() method, which resets self._source to an empty list) |
| 189 | def visit(self, node): |
| 190 | """Outputs a source code string that, if converted back to an ast |
| 191 | (using ast.parse) will generate an AST equivalent to *node*""" |
| 192 | self._source = [] |
| 193 | self.traverse(node) |
| 194 | return "".join(self._source) |
| 195 | |
| 196 | def _write_docstring_and_traverse_body(self, node): |
| 197 | if (docstring := self.get_raw_docstring(node)): |
no test coverage detected