Skip to content

Commit 4030120

Browse files
authored
Fix mypy precommit (#6110)
This seems to have conflicted between changing the types and updating the version in pre-commit. Oddly, the code work when running `mypy` but not running in pre-commit. But this code solves for both
1 parent 7ac7949 commit 4030120

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
# - id: velin
3333
# args: ["--write", "--compact"]
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v0.920
35+
rev: v0.930
3636
hooks:
3737
- id: mypy
3838
# `properies` & `asv_bench` are copied from setup.cfg.

xarray/core/dataset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,12 +1068,12 @@ def persist(self, **kwargs) -> "Dataset":
10681068
@classmethod
10691069
def _construct_direct(
10701070
cls,
1071-
variables: Mapping[Any, Variable],
1071+
variables: Dict[Any, Variable],
10721072
coord_names: Set[Hashable],
1073-
dims: Mapping[Any, int] = None,
1074-
attrs: Mapping = None,
1075-
indexes: Mapping[Any, Index] = None,
1076-
encoding: Mapping = None,
1073+
dims: Dict[Any, int] = None,
1074+
attrs: Dict = None,
1075+
indexes: Dict[Any, Index] = None,
1076+
encoding: Dict = None,
10771077
close: Callable[[], None] = None,
10781078
) -> "Dataset":
10791079
"""Shortcut around __init__ for internal use when we want to skip

0 commit comments

Comments
 (0)