Skip to content

Commit

Permalink
Add type definitions in prep for pydata#6086
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Dec 21, 2021
1 parent dbc02d4 commit 1a9c7aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ ignore_missing_imports = True
ignore_missing_imports = True
[mypy-h5py.*]
ignore_missing_imports = True
[mypy-importlib_metadata.*]
ignore_missing_imports = True
[mypy-iris.*]
ignore_missing_imports = True
[mypy-matplotlib.*]
Expand Down
18 changes: 9 additions & 9 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,14 +1068,14 @@ def persist(self, **kwargs) -> "Dataset":
@classmethod
def _construct_direct(
cls,
variables,
coord_names,
dims=None,
attrs=None,
indexes=None,
encoding=None,
close=None,
):
variables: Mapping[Hashable, Variable],
coord_names: Set[Hashable],
dims: Mapping[Hashable, int] = None,
attrs: Mapping = None,
indexes: Mapping[Hashable, Index] = None,
encoding: Mapping = None,
close: Callable[[], None] = None,
) -> "Dataset":
"""Shortcut around __init__ for internal use when we want to skip
costly validation
"""
Expand Down Expand Up @@ -2359,7 +2359,7 @@ def isel(
indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims)

variables = {}
dims: Dict[Hashable, Tuple[int, ...]] = {}
dims: Dict[Hashable, int] = {}
coord_names = self._coord_names.copy()
indexes = self._indexes.copy() if self._indexes is not None else None

Expand Down

0 comments on commit 1a9c7aa

Please sign in to comment.