Skip to content

Commit 31cf4b0

Browse files
abrookinsclaude
andcommitted
Fix CLI sync/async transformation issues
The async-to-sync transformation was incomplete for CLI commands, causing "coroutine was expected" errors in tests. Added proper transformation rules to convert run_async() wrapper calls to direct function calls in sync versions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a83b591 commit 31cf4b0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

aredis_om/model/cli/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import click
66

7-
from ..migrations.schema_migrator import SchemaMigrator
87
from ...settings import get_root_migrations_dir
8+
from ..migrations.schema_migrator import SchemaMigrator
99

1010

1111
def run_async(coro):

make_sync.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"pytest_asyncio": "pytest",
1111
"py_test_mark_asyncio": "py_test_mark_sync",
1212
"AsyncMock": "Mock",
13+
"run_async(_status())": "_status()",
14+
"run_async(_run())": "_run()",
15+
"run_async(_create())": "_create()",
16+
"run_async(_rollback())": "_rollback()",
1317
}
1418

1519

0 commit comments

Comments
 (0)