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

Simplify import checking with LibCST's FullyQualifiedNameProvider #362

Open
browniebroke opened this issue Mar 30, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@browniebroke
Copy link
Owner

Is your feature request related to a problem? Please describe.

LibCST 0.3.18 added a FullyQualifiedNameProvider which seems like it could help us simplify our checks for imported symbols:

https://libcst.readthedocs.io/en/latest/metadata.html#libcst.metadata.FullyQualifiedNameProvider

Describe the solution you'd like

https://github.com/browniebroke/django-codemod/blob/main/django_codemod/visitors/base.py

Especially, the code from BaseRenameTransformer.leave_ImportFrom seems like a good candidate.

@browniebroke browniebroke added the enhancement New feature or request label Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant