Skip to content

Commit dd9fe2a

Browse files
authored
update mypy to 0.790 (#4581)
1 parent b76a13f commit dd9fe2a

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: flake8
2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v0.782 # Must match ci/requirements/*.yml
22+
rev: v0.790 # Must match ci/requirements/*.yml
2323
hooks:
2424
- id: mypy
2525
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194

ci/requirements/py36.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- isort
2323
- lxml # Optional dep of pydap
2424
- matplotlib
25-
- mypy=0.782 # Must match .pre-commit-config.yaml
25+
- mypy=0.790 # Must match .pre-commit-config.yaml
2626
- nc-time-axis
2727
- netcdf4
2828
- numba

ci/requirements/py37-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- isort
2323
- lxml # Optional dep of pydap
2424
- matplotlib
25-
- mypy=0.782 # Must match .pre-commit-config.yaml
25+
- mypy=0.790 # Must match .pre-commit-config.yaml
2626
- nc-time-axis
2727
- netcdf4
2828
- numba

ci/requirements/py37.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- isort
2323
- lxml # Optional dep of pydap
2424
- matplotlib
25-
- mypy=0.782 # Must match .pre-commit-config.yaml
25+
- mypy=0.790 # Must match .pre-commit-config.yaml
2626
- nc-time-axis
2727
- netcdf4
2828
- numba

ci/requirements/py38-all-but-dask.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- isort
2020
- lxml # Optional dep of pydap
2121
- matplotlib
22-
- mypy=0.782 # Must match .pre-commit-config.yaml
22+
- mypy=0.790 # Must match .pre-commit-config.yaml
2323
- nc-time-axis
2424
- netcdf4
2525
- numba

ci/requirements/py38.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- isort
2323
- lxml # Optional dep of pydap
2424
- matplotlib
25-
- mypy=0.782 # Must match .pre-commit-config.yaml
25+
- mypy=0.790 # Must match .pre-commit-config.yaml
2626
- nc-time-axis
2727
- netcdf4
2828
- numba

xarray/core/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ def __delitem__(self, key: K) -> None:
463463
del self.mapping[key]
464464

465465
def __iter__(self) -> Iterator[K]:
466-
return iter(sorted(self.mapping))
466+
# see #4571 for the reason of the type ignore
467+
return iter(sorted(self.mapping)) # type: ignore
467468

468469
def __len__(self) -> int:
469470
return len(self.mapping)

0 commit comments

Comments
 (0)