-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[MNT]: Cleanup pyplot imports #22149
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
Comments
Here are all unused imports in current flake8
pylint
Apart from being a bit "disturbing" when the editor shows warnings, it is primarily a problem if you have to modify a line with unused imports as To disable these warnings use:
|
Hey! I'd love to know the state of this, as I think it would be a great opportunity for me to understand how to utilize linters and other tools to find unused imports. |
@pedrompecanha Thanks for your interest. This is not a technical issue. The way to use linters to find unused imports is already written down in the collapsed sections of #22149 (comment). The key task here is to make judgement calls on the unused imported items, whether we want to remove them or whether they are an intentional reimport and we want to consider them part of the public API of pyplot. |
Summary
pyplot
has a number of unused imports. Some of them are intentional e.g.plt.cycler
, some seem unnecessary e.g.plt.TickHelper
.Proposed fix
Go through all unused imports and decide if we want to keep it. Also use github search to help on the decision. We don't want to force lots of users to change their imports.
Mark all intentional imports with a comment
Deprecate all unwanted imports.
The text was updated successfully, but these errors were encountered: