-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: FIxed an issue where running mypy could raise an AssertionError #17376
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
Conversation
I'm still getting 36 errors with |
Does something similar happen when running |
That seems to work.
OTOH
Fails. Indeed, any path ending in |
I suspect there is an older preexisting mypy cache which is causing problems. If my suspicion is correct Note that this shouldn't affect the CI execution speed, as those start without any cached mypy files anyway. |
Doesn't help here. |
Likewise, I am still getting 36 failures. Here is the traceback for the last one, they are all similar.
|
Does removing the sub-module imports change anything? Lines 44 to 60 in c7aa92c
|
No, still fails. Just to be clear, what command are we testing now? |
The |
@BvB93 Do you have any related environmental variables set? |
No, none whatsoever. |
Continuing the theme of removing imports: Lines 62 to 154 in c7aa92c
|
That helps:
|
The errors are to be expected, considering a number of functions were suddenly ripped out of the main numpy space. Still, while it is good to know that the problem can be fixed, the required solution is less then ideal: moving the functions defined in sub-modules (back) to the main Would it be an idea to be bring this up in Wednesday's meeting? |
Closing this per our discussion in todays' meeting, i.e. mark the typing tests as slow as a band aid for avoiding (local) mypy crashes. |
Let's leave this open until the PR is merged. You can make that automatic by putting something like |
That's pretty neat actually, I never realized you could close a PR with another PR. |
Whoops, my bad. I thought this was an issue, not a PR. No, that won't work. Closing again. |
Closes #17316.
Fixes an issue where certain import cycles could crash mypy.
That, and
np.core
shouldn't have been imported here in the first place (as it's not a public module).