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

remove outdated type-ignores #10006

Merged
merged 2 commits into from
Jan 30, 2025
Merged

remove outdated type-ignores #10006

merged 2 commits into from
Jan 30, 2025

Conversation

kmuehlbauer
Copy link
Contributor

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@kmuehlbauer kmuehlbauer added the run-upstream Run upstream CI label Jan 30, 2025
@kmuehlbauer kmuehlbauer mentioned this pull request Jan 30, 2025
@kmuehlbauer
Copy link
Contributor Author

Those typing issues are a real pain.

So the typing worked in an environment with numpy 2.0.2. It failed with numpy 2.1.3. When removing that type-ignore it resurfaces for numpy dev version. Weird.

  • numpy: 2.1.3
xarray/core/dataset.py:9144: error: Unused "type: ignore" comment  [unused-ignore]
  • numpy: 2.3.0.dev0+git20250128.a1fa8e1
xarray/core/dataset.py: note: In member "polyfit" of class "Dataset":
xarray/core/dataset.py:9144: error: Incompatible types in assignment (expression has type "floating[Any]", variable has type "float | None")  [assignment]

@kmuehlbauer kmuehlbauer requested a review from headtr1ck January 30, 2025 10:49
@kmuehlbauer
Copy link
Contributor Author

So the floating Any issue is probably this: python/mypy#18566.

Good to merge?

@kmuehlbauer kmuehlbauer enabled auto-merge (squash) January 30, 2025 16:48
@kmuehlbauer kmuehlbauer merged commit 97a4a71 into pydata:main Jan 30, 2025
27 of 28 checks passed
@kmuehlbauer kmuehlbauer deleted the fix-mypy branch January 30, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-upstream Run upstream CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants