Skip to content

Commit

Permalink
Fix mypy precommit (#6110)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
max-sixty authored Dec 26, 2021
1 parent 7ac7949 commit 4030120
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
# - id: velin
# args: ["--write", "--compact"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.920
rev: v0.930
hooks:
- id: mypy
# `properies` & `asv_bench` are copied from setup.cfg.
Expand Down
10 changes: 5 additions & 5 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,12 +1068,12 @@ def persist(self, **kwargs) -> "Dataset":
@classmethod
def _construct_direct(
cls,
variables: Mapping[Any, Variable],
variables: Dict[Any, Variable],
coord_names: Set[Hashable],
dims: Mapping[Any, int] = None,
attrs: Mapping = None,
indexes: Mapping[Any, Index] = None,
encoding: Mapping = None,
dims: Dict[Any, int] = None,
attrs: Dict = None,
indexes: Dict[Any, Index] = None,
encoding: Dict = None,
close: Callable[[], None] = None,
) -> "Dataset":
"""Shortcut around __init__ for internal use when we want to skip
Expand Down

0 comments on commit 4030120

Please sign in to comment.