-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Mypy errors with matplotlib 3.8 #7802
Comments
[xy]ticks upstream PR submitted, linked above |
@headtr1ck I just got reminded about this issue (in person at scipy) by @ksunden of matplotlib. He says ominously type hints are coming... But that he is willing to help us with type hinting our code. |
Thanks for the reminder. I should have more time to work on this soon. Would be nice to align everything! |
I have now an env with the newest numpy (pypi) and matplotlib (main branch). Some mypy errors have to be fixed on matplotlibs side. |
The major issue that I was encountering was that we do not distinguish between |
I think that #8030 clears up most of the flags for 3D stuff (probably mostly by ignoring for now...) it's not super easy to do that statically (as e.g. matplotlib projections are actually a dynamically changeable thing...) we may be able to work towards doing better for axis creation methods, but that only goes so far sometimes... I think some use of We are looking to branch and release an RC this week (maybe as soon as tomorrow, but trying to get a handful of more PRs merged...), and how long it takes/if there are further RCs depends on what feedback we get on the RC (which includes whether further changes are needed to type hints) |
@ksunden - I got the same error with matplitlib 3.9.2 @headtr1ck - I fixed the mypy error with explicit type hint from mpl_toolkits.mplot3d import Axes3D
ax: Axes3D = fig.add_subplot(2, 2, i, projection="3d") |
Matplotlib has started to support typing in main (matplotlib/matplotlib#20504) and mypy is throwing a few errors:
Some guidance how to solve these:
Originally posted by @ksunden in #7787 (comment)
Originally posted by @ksunden in #7787 (comment)
Originally posted by @tacaswell in #7787 (comment)
The text was updated successfully, but these errors were encountered: