Skip to content

Mypy 1.12 issues #9624

Closed
Closed

Description

@kmuehlbauer

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 😬.

Activity

  1. added and removed
    needs triageIssue that has not been reviewed by xarray team member
    on Oct 16, 2024
  2. headtr1ck commented on Oct 27, 2024

    @headtr1ck
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions