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

Revert removal of unused wildcard imports (#1256) as it can lead to removal of required imports #1402

Merged
merged 3 commits into from
Mar 12, 2022

Conversation

paul-dingemans
Copy link
Collaborator

@paul-dingemans paul-dingemans commented Mar 12, 2022

Description

There is no reliable way to determined whether a wildcard import is actually used
in the file. The AST does not seem to contain information about the actuall class
that an identifier refers to. It is preferred to not remove unused imports than
that needed imports are removed.

Revert #1256
Closes #1277
Closes #1393

Checklist

  • tests are added
  • CHANGELOG.md is updated

…lead to removal of required imports

There is no reliable way to determined whether a wildcard import is actually used
in the file. The AST does not seem to contain information about the actuall class
that an identifier refers to. It is preferred to not remove unused imports than
that needed imports are removed.

Revert pinterest#1256
Closes pinterest#1277
@paul-dingemans paul-dingemans merged commit 22e4234 into pinterest:master Mar 12, 2022
@paul-dingemans paul-dingemans added this to the 0.45.0 milestone Mar 12, 2022
@paul-dingemans paul-dingemans deleted the 1258-revert branch March 12, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant