Skip to content

Commit 5f161a4

Browse files
committed
fix(utils): remove async references in sync client
1 parent eae1482 commit 5f161a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

utils/run-unasync.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ def run_unasync(output_dir: Path, check: bool = False) -> None:
4747
)
4848
filepaths = collect_files(source_dir)
4949
unasync.unasync_files(filepaths, [rule])
50+
if replacements:
51+
for path in target_dir.rglob("*.py"):
52+
text = path.read_text()
53+
new_text = text
54+
for old, new in replacements.items():
55+
new_text = new_text.replace(old, new)
56+
if new_text != text:
57+
path.write_text(new_text)
5058

5159
if check:
5260
diffs: list[str] = []

0 commit comments

Comments
 (0)