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

Check for unused imports #39

Open
srittau opened this issue Jun 2, 2020 · 3 comments
Open

Check for unused imports #39

srittau opened this issue Jun 2, 2020 · 3 comments

Comments

@srittau
Copy link
Collaborator

srittau commented Jun 2, 2020

A check that knows the special import handling in stubs. E.g.:

from x import a, b, c as c

x: b

This should complain about a being unused, but not b or c.

@JelleZijlstra
Copy link
Collaborator

If there's an existing flake8 check or plugin that does this, it might just be a matter of adding the right incantations so that that check covers stub files.

@JelleZijlstra
Copy link
Collaborator

In typeshed we now get unused import checking from Pyright. I suppose it's still useful for flake8 to do it too (e.g. for other stub projects that don't support Pyright), but it feels low priority.

@Zeckie
Copy link

Zeckie commented May 20, 2022

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

No branches or pull requests

4 participants