Skip to content

Commit 924c052

Browse files
crusaderkydcherian
authored andcommitted
Bump mypy to v0.761 (#3704)
1 parent 46dfb77 commit 924c052

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
hooks:
1212
- id: flake8
1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v0.730 # Must match ci/requirements/*.yml
14+
rev: v0.761 # Must match ci/requirements/*.yml
1515
hooks:
1616
- id: mypy
1717
# run these occasionally, ref discussion https://github.com/pydata/xarray/pull/3194

ci/requirements/py36-min-all-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
- iris=2.2
2626
- lxml=4.4 # Optional dep of pydap
2727
- matplotlib=3.1
28-
- mypy=0.730 # Must match .pre-commit-config.yaml
28+
- mypy=0.761 # Must match .pre-commit-config.yaml
2929
- nc-time-axis=1.2
3030
- netcdf4=1.4
3131
- numba=0.44

ci/requirements/py36.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
- iris
2222
- lxml # optional dep of pydap
2323
- matplotlib
24-
- mypy=0.730 # Must match .pre-commit-config.yaml
24+
- mypy=0.761 # Must match .pre-commit-config.yaml
2525
- nc-time-axis
2626
- netcdf4
2727
- numba

ci/requirements/py37-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
- iris
2222
- lxml # Optional dep of pydap
2323
- matplotlib
24-
- mypy=0.730 # Must match .pre-commit-config.yaml
24+
- mypy=0.761 # Must match .pre-commit-config.yaml
2525
- nc-time-axis
2626
- netcdf4
2727
- numba

ci/requirements/py37.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
- iris
2222
- lxml # Optional dep of pydap
2323
- matplotlib
24-
- mypy=0.730 # Must match .pre-commit-config.yaml
24+
- mypy=0.761 # Must match .pre-commit-config.yaml
2525
- nc-time-axis
2626
- netcdf4
2727
- numba

xarray/core/computation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def _as_variables_or_variable(arg):
304304
def _unpack_dict_tuples(
305305
result_vars: Mapping[Hashable, Tuple[Variable, ...]], num_outputs: int
306306
) -> Tuple[Dict[Hashable, Variable], ...]:
307-
out = tuple({} for _ in range(num_outputs)) # type: ignore
307+
out: Tuple[Dict[Hashable, Variable], ...] = tuple({} for _ in range(num_outputs))
308308
for name, values in result_vars.items():
309309
for value, results_dict in zip(values, out):
310310
results_dict[name] = value

xarray/core/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,11 +897,11 @@ def _replace(
897897
if dims is not None:
898898
self._dims = dims
899899
if attrs is not _default:
900-
self._attrs = attrs # type: ignore # FIXME need mypy 0.750
900+
self._attrs = attrs
901901
if indexes is not _default:
902-
self._indexes = indexes # type: ignore # FIXME need mypy 0.750
902+
self._indexes = indexes
903903
if encoding is not _default:
904-
self._encoding = encoding # type: ignore # FIXME need mypy 0.750
904+
self._encoding = encoding
905905
obj = self
906906
else:
907907
if variables is None:

0 commit comments

Comments
 (0)