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
The short version is "its complicated" and, while we can do better the perfect behavior is not super possible, since this method returns different types based on the value of parameters. Any is a shortcut for "at least it won't yell at users here".
I am going to close this as a duplicate of #27025, And will also respond to your question in #27001
Bug summary
plt.subplots in matplotlib 3.8.0 returns
tuple[Figure, Any]
, so Pylance doesn't know the type ofax
Code for reproduction
Actual outcome
The intelisense does not work for
ax
so it has to be explicitly typehinted.Expected outcome
The import of
Axes
and the typehint ofax
should not be required.Additional information
please see this stackoverflow link: https://stackoverflow.com/questions/77368904/methods-and-attributes-do-not-show-when-dot-is-pressed-intellisense
Operating system
windows 11
Matplotlib Version
3.8.0
Matplotlib Backend
TkAgg
Python version
3.12
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: