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

Generalize import-rewrite infrastructure #1522

Closed
charliermarsh opened this issue Jan 1, 2023 · 4 comments
Closed

Generalize import-rewrite infrastructure #1522

charliermarsh opened this issue Jan 1, 2023 · 4 comments
Labels
core Related to core functionality

Comments

@charliermarsh
Copy link
Member

In #1488, we added some infra to rewrite mock imports. But the problem is quite general. We've done similar stuff for six imports.

You can see how pyupgrade handles this problem.

We should at least implement the REPLACE_EXACT logic since (I think?) that's what we have for mock.

@charliermarsh charliermarsh added the core Related to core functionality label Jan 1, 2023
@charliermarsh
Copy link
Member Author

I need to look at where else this would be useful.

@charliermarsh
Copy link
Member Author

This is largely handled by #2049.

@JonathanPlasse
Copy link
Contributor

Does it support adding a new import?

@charliermarsh
Copy link
Member Author

No, but that's tracked in #835.

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

No branches or pull requests

2 participants