Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed as not planned
Description
Bug summary
We had code that did imports ofAxes
andFigure
as follows:
This used to work fine with type checkers like pyright and mypy prior to matplotlib 3.8. Now the type checkers complain.
Code for reproduction
frommatplotlibimportpyplotaspltplt.Axesplt.Figure
Actual outcome
pyright reports thatAxes
andFigure
are not exported from the modulepyplot
Expected outcome
No typing error.
Additional information
Fix would be to do something like this inpyplot.py
frommatplotlib.axesimportAxesasAxesfrommatploblib.figureimportFigureasFigure
This came up due to our CI forpandas-stubs
that was testing typing of pandas against matplotlib imports
Operating system
Windows 10
Matplotlib Version
3.8
Matplotlib Backend
N/A
Python version
3.10
Jupyter version
N/A
Installation
pip
Metadata
Metadata
Assignees
Labels
No labels