Outputs a source code string that, if converted back to an ast (using ast.parse) will generate an AST equivalent to *node*
(self, node)
| 812 | # NodeVisitor.generic_visit to handle any nodes (as it calls back in to |
| 813 | # the subclass visit() method, which resets self._source to an empty list) |
| 814 | def visit(self, node): |
| 815 | """Outputs a source code string that, if converted back to an ast |
| 816 | (using ast.parse) will generate an AST equivalent to *node*""" |
| 817 | self._source = [] |
| 818 | self.traverse(node) |
| 819 | return "".join(self._source) |
| 820 | |
| 821 | def _write_docstring_and_traverse_body(self, node): |
| 822 | if (docstring := self.get_raw_docstring(node)): |
no test coverage detected