unasync
unasync copied to clipboard
Imports from _async module doesn't get converted to imports from _sync
Imports from the _async module seem to be unaffected:
from library._async.module import AsyncFoo
gets converted to
from library._async.module import SyncFoo
Expected result:
from library._sync.module import SyncFoo
Currently working around it by exporting both the classes from a common place, but it'd be nice to have this work.
You can find examples of using the additional_replacements parameter of Rule to add custom replacements.
https://unasync.readthedocs.io/en/latest/#usage-outside-of-setuptools
This should allow you to achieve what you're after.