MCPcopy
hub / github.com/psycopg/psycopg / tree_to_str

Function tree_to_str

tools/async_to_sync.py:205–212  ·  view source on GitHub ↗
(tree: ast.AST, filepath: Path)

Source from the content-addressed store, hash-verified

203
204
205def 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
215class AsyncToSync(ast.NodeTransformer): # type: ignore

Callers 1

convertFunction · 0.85

Calls 1

unparseFunction · 0.85

Tested by

no test coverage detected