MCPcopy
hub / github.com/psycopg/psycopg / async_to_sync

Function async_to_sync

tools/async_to_sync.py:198–202  ·  view source on GitHub ↗
(tree: ast.AST, filepath: Path | None = None)

Source from the content-addressed store, hash-verified

196
197
198def async_to_sync(tree: ast.AST, filepath: Path | None = None) -> ast.AST:
199 tree = BlanksInserter().visit(tree)
200 tree = RenameAsyncToSync().visit(tree)
201 tree = AsyncToSync().visit(tree)
202 return tree
203
204
205def tree_to_str(tree: ast.AST, filepath: Path) -> str:

Callers 2

convertFunction · 0.85
_visit_type_stringMethod · 0.85

Calls 3

BlanksInserterClass · 0.85
RenameAsyncToSyncClass · 0.85
AsyncToSyncClass · 0.85

Tested by

no test coverage detected