-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MNT: Remove unused imports #23554
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
MNT: Remove unused imports #23554
Conversation
It looks like this is caused by this blanket exception; perhaps that can be removed now? |
There are still unused imports in backends, but ones that I believe are required, like the FigureManagers etc. I guess one can mark the lines, which I am strongly in favour of instead of the file, but it will take some time... |
Perhaps you can remove F401 for all backends from |
New change where I started to use There is a minor risk for breakage. For example, it is in current main possible to import numpy as:
This is no longer possible after this change. |
@@ -46,7 +46,7 @@ | |||
import matplotlib.axes as maxes | |||
from matplotlib.path import Path | |||
from mpl_toolkits.axes_grid1 import mpl_axes | |||
from .axisline_style import AxislineStyle | |||
from .axisline_style import AxislineStyle # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe one should deprecate this? Not sure if someone is actually importing it from here?
Converting to draft until I have had time to think about the |
eb69b80
to
0911175
Compare
PR Summary
Found some unused imports.
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).