Skip to content

Commit 40c016d

Browse files
authored
Add type definitions in prep for #6086 (#6090)
* Add type definitions in prep for #6086 #6086
1 parent a2d968b commit 40c016d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ ignore_missing_imports = True
198198
ignore_missing_imports = True
199199
[mypy-h5py.*]
200200
ignore_missing_imports = True
201+
[mypy-importlib_metadata.*]
202+
ignore_missing_imports = True
201203
[mypy-iris.*]
202204
ignore_missing_imports = True
203205
[mypy-matplotlib.*]

xarray/core/dataset.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,14 +1068,14 @@ def persist(self, **kwargs) -> "Dataset":
10681068
@classmethod
10691069
def _construct_direct(
10701070
cls,
1071-
variables,
1072-
coord_names,
1073-
dims=None,
1074-
attrs=None,
1075-
indexes=None,
1076-
encoding=None,
1077-
close=None,
1078-
):
1071+
variables: Mapping[Any, Variable],
1072+
coord_names: Set[Hashable],
1073+
dims: Mapping[Any, int] = None,
1074+
attrs: Mapping = None,
1075+
indexes: Mapping[Any, Index] = None,
1076+
encoding: Mapping = None,
1077+
close: Callable[[], None] = None,
1078+
) -> "Dataset":
10791079
"""Shortcut around __init__ for internal use when we want to skip
10801080
costly validation
10811081
"""
@@ -2359,7 +2359,7 @@ def isel(
23592359
indexers = drop_dims_from_indexers(indexers, self.dims, missing_dims)
23602360

23612361
variables = {}
2362-
dims: Dict[Hashable, Tuple[int, ...]] = {}
2362+
dims: Dict[Hashable, int] = {}
23632363
coord_names = self._coord_names.copy()
23642364
indexes = self._indexes.copy() if self._indexes is not None else None
23652365

0 commit comments

Comments
 (0)