Skip to content
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

Revert disabling mypy call-overload #867

Open
mgovers opened this issue Jan 7, 2025 · 0 comments
Open

Revert disabling mypy call-overload #867

mgovers opened this issue Jan 7, 2025 · 0 comments

Comments

@mgovers
Copy link
Member

mgovers commented Jan 7, 2025

Revert #863 after the patches to the typing regression in NumPy 2.2.0 are fixed.

After investigating, seems to be a NumPy typing regression and not a problem on our end. Basically, there are a lot of typing regressions in numpy 2.2.0.

We will probably want to track this overview issue: numpy/numpy#28076
Note that mypy is also taking action in python/mypy#18343

Minimal repro case for our use case below. When that passes, we should be able to revert this PR.

import numpy as np

# our use case
STRUCTURED_ARR = np.array([(1, 2), (3, 4)], dtype=np.dtype([('a', int), ('b', int)]))
STRUCTURED_ARR['a'] = 10  # mypy error

# even smaller taken from https://github.com/numpy/numpy/issues/28076
ARR = np.arange(2)
ARR = x + 1  # mypy error

Originally posted by @mgovers in #863 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant