Skip to content

Update mypy CI to python 3.12 #9319

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ jobs:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"

steps:
- uses: actions/checkout@v4
12 changes: 6 additions & 6 deletions xarray/tests/test_typed_ops.py
Original file line number Diff line number Diff line change
@@ -136,8 +136,8 @@ def _test(ds: Dataset) -> None:
_test(_int + ds)
_test(_list + ds)
_test(_ndarray + ds)
_test(_var + ds)
_test(_da + ds)
_test(_var + ds) # type: ignore[arg-type] # TODO: wrong in mypy 312
_test(_da + ds) # type: ignore[arg-type] # TODO: wrong in mypy 312

# __eq__ as an example of cmp ops
_test(ds == _int)
@@ -148,8 +148,8 @@ def _test(ds: Dataset) -> None:
_test(_int == ds) # type: ignore[arg-type] # typeshed problem
_test(_list == ds) # type: ignore[arg-type] # typeshed problem
_test(_ndarray == ds)
_test(_var == ds)
_test(_da == ds)
_test(_var == ds) # type: ignore[arg-type] # TODO: wrong in mypy 312
_test(_da == ds) # type: ignore[arg-type] # TODO: wrong in mypy 312

# __lt__ as another example of cmp ops
_test(ds < _int)
@@ -160,8 +160,8 @@ def _test(ds: Dataset) -> None:
_test(_int > ds)
_test(_list > ds)
_test(_ndarray > ds) # type: ignore[arg-type] # numpy problem
_test(_var > ds)
_test(_da > ds)
_test(_var > ds) # type: ignore[arg-type] # TODO: wrong in mypy 312
_test(_da > ds) # type: ignore[arg-type] # TODO: wrong in mypy 312

# __iadd__ as an example of inplace binary ops
ds += _int