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

Mypy 1.12 issues #9624

Open
kmuehlbauer opened this issue Oct 15, 2024 · 1 comment · May be fixed by #9687
Open

Mypy 1.12 issues #9624

kmuehlbauer opened this issue Oct 15, 2024 · 1 comment · May be fixed by #9687

Comments

@kmuehlbauer
Copy link
Contributor

What is your issue?

Mypy 1.12 was released yesterday and broke our testing:

Found 3 errors in 2 files (checked 169 source files)
xarray/backends/common.py:114: error: Incompatible types in assignment (expression has type "list[Any | Sequence[str | PathLike[Any]] | Sequence[Sequence[str | PathLike[Any]]] | Sequence[Sequence[Sequence[str | PathLike[Any]]]]]", variable has type "str | PathLike[Any] | str | PathLike[Any] | Sequence[str | PathLike[Any]] | Sequence[Sequence[str | PathLike[Any]]] | Sequence[Sequence[Sequence[str | PathLike[Any]]]] | Sequence[Sequence[Sequence[Sequence[str | PathLike[Any]]]]]")  [assignment]
xarray/backends/common.py:116: error: Incompatible return value type (got "list[Any] | Sequence[str | PathLike[Any]] | Sequence[Sequence[str | PathLike[Any]]] | Sequence[Sequence[Sequence[str | PathLike[Any]]]] | Sequence[Sequence[Sequence[Sequence[str | PathLike[Any]]]]]", expected "list[str]")  [return-value]
Error: Process completed with exit code 1.

In #9621 I've pinned mypy to the last working version 1.11.2. Not sure, if this is a big issue and how much it takes to resolve, my typing-fu is mediocre 😬.

@kmuehlbauer kmuehlbauer added the needs triage Issue that has not been reviewed by xarray team member label Oct 15, 2024
@TomNicholas TomNicholas added topic-typing and removed needs triage Issue that has not been reviewed by xarray team member labels Oct 16, 2024
@headtr1ck headtr1ck linked a pull request Oct 27, 2024 that will close this issue
1 task
@headtr1ck
Copy link
Collaborator

Actually a "homemade" problem.
I was the one who added type hints to netCDF4 in the first place, haha!

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

Successfully merging a pull request may close this issue.

3 participants