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

Option to disable import replacement #297

Closed
agronholm opened this issue Sep 22, 2022 · 1 comment
Closed

Option to disable import replacement #297

agronholm opened this issue Sep 22, 2022 · 1 comment

Comments

@agronholm
Copy link
Contributor

The typing_extensions library contains more up to date versions of some functions and should not be replaced with the corresponding stdlib import. But as the tool cannot know when I actually need these newer versions, there should preferably be an option to prevent the replacement of imports, much like with # noreorder.

A practical example, one I ran into, is the get_type_hints() function which provides the include_extras parameter not found in the stdlib version.

@asottile
Copy link
Owner

in such cases we usually update the target version instead -- for example #289

feel free to send a patch

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