Skip to content

Simplify import checking with LibCST's FullyQualifiedNameProvider #362

@browniebroke

Description

@browniebroke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions