Merge branch 'main' into asyncio
This commit is contained in:
commit
ca6ae7d6e9
47 changed files with 3285 additions and 760 deletions
32
make_sync.py
Normal file
32
make_sync.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import unasync
|
||||
|
||||
|
||||
def main():
|
||||
additional_replacements = {
|
||||
"aredis_om": "redis_om",
|
||||
"aioredis": "redis"
|
||||
}
|
||||
rules = [
|
||||
unasync.Rule(
|
||||
fromdir="/aredis_om/",
|
||||
todir="/redis_om/",
|
||||
additional_replacements=additional_replacements,
|
||||
),
|
||||
]
|
||||
|
||||
filepaths = []
|
||||
for root, _, filenames in os.walk(
|
||||
Path(__file__).absolute().parent / "aredis_om"
|
||||
):
|
||||
for filename in filenames:
|
||||
if filename.rpartition(".")[-1] in ("py", "pyi",):
|
||||
filepaths.append(os.path.join(root, filename))
|
||||
|
||||
unasync.unasync_files(filepaths, rules)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue