(tree: ast.AST, filepath: Path)
| 203 | |
| 204 | |
| 205 | def tree_to_str(tree: ast.AST, filepath: Path) -> str: |
| 206 | rv = f"""\ |
| 207 | # WARNING: this file is auto-generated by '{SCRIPT_NAME}' |
| 208 | # from the original file '{filepath.name}' |
| 209 | # DO NOT CHANGE! Change the original file instead. |
| 210 | """ |
| 211 | rv += unparse(tree) |
| 212 | return rv |
| 213 | |
| 214 | |
| 215 | class AsyncToSync(ast.NodeTransformer): # type: ignore |