You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed on the call, Matplotlib may reconsider this after numpy has been through type hinting for a couple of releases.
In the meantime, if anyone wants to release a separate package that supplies the hinting stubs, matplotlib would be be happy to support, perhaps even on the matplotlib root project (i.e. matplotlib/mpl-hinting) once it was shown to be generally useful.
The pandas team and the numpy team are both in the process of integrating type stubs into their codebases, and we don't see the point of competing with them.
We met with the leader of the Microsoft project and VirtusLabs and agreed that the pandas team would start supplying the stubs, that the pandas stubs would be removed from the Microsoft project, and that VirtusLabs would deprecate their stubs.
The pylance team now bundles the "official" pandas-stubs with pylance.
I would suggest a similar path for matplotlib. Create a matplotlib-stubs project, and work with Microsoft to use their stubs as a starting point. You might also consider looking at what we are doing in pandas-stubs to create a testing methodology for correctness of the stubs.
Activity
story645 commentedon Jun 24, 2021
xref: #17991, #13798, #15926
jklymak commentedon Jun 24, 2021
As discussed on the call, Matplotlib may reconsider this after numpy has been through type hinting for a couple of releases.
In the meantime, if anyone wants to release a separate package that supplies the hinting stubs, matplotlib would be be happy to support, perhaps even on the matplotlib root project (i.e. matplotlib/mpl-hinting) once it was shown to be generally useful.
We will keep this open to track conversation.
rggjan commentedon Jun 28, 2021
Sorry, didn't find the other issues, probably since I was only searching for mypy...
rggjan commentedon Jun 28, 2021
Maybe some of this could be taken over:
Mypy type stubs for NumPy, pandas, and Matplotlib
?
It has the note:
tmke8 commentedon Dec 1, 2022
The Pylance team at Microsoft seems to have produced pretty good type stubs for matplotlib: https://github.com/microsoft/python-type-stubs/tree/main/matplotlib
tacaswell commentedon Dec 2, 2022
Also see https://discourse.matplotlib.org/t/i-see-the-type-hints-from-vs-code-but-i-dont-understand-where-they-are-defined-in-the-code-in-github/22786/6
Dr-Irv commentedon Jan 9, 2023
With
pandas, we created apandas-stubsproject https://github.com/pandas-dev/pandas-stubs that evolved as follows:I would suggest a similar path for
matplotlib. Create amatplotlib-stubsproject, and work with Microsoft to use their stubs as a starting point. You might also consider looking at what we are doing inpandas-stubsto create a testing methodology for correctness of the stubs.