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

disable mypy call-overload #863

Merged
merged 1 commit into from
Dec 30, 2024
Merged

disable mypy call-overload #863

merged 1 commit into from
Dec 30, 2024

Conversation

petersalemink95
Copy link
Member

Mypy 1.14.0 cannot handle PGM's data_types.

For now, let's ignore this. We need to investigate after the holidays

Signed-off-by: petersalemink95 <peter.salemink95@gmail.com>
@TonyXiang8787 TonyXiang8787 added this pull request to the merge queue Dec 30, 2024
Merged via the queue into main with commit b941ae5 Dec 30, 2024
28 checks passed
@TonyXiang8787 TonyXiang8787 deleted the feature/disable-mypy branch December 30, 2024 15:17
@mgovers
Copy link
Member

mgovers commented Jan 7, 2025

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

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

Successfully merging this pull request may close these issues.

3 participants