Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imports from _async module doesn't get converted to imports from _sync #79

Open
anand2312 opened this issue Sep 30, 2023 · 1 comment
Open

Comments

@anand2312
Copy link

anand2312 commented Sep 30, 2023

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.

@robsdedude
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants