Skip to content

Commit

Permalink
Update type of _get_output_dim_selector
Browse files Browse the repository at this point in the history
  • Loading branch information
kmsquire committed Jul 20, 2021
1 parent b98ab3a commit b36a049
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/core/rolling.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import functools
import itertools
import warnings
from typing import Any, Callable, Dict
from typing import Any, Callable, Dict, Hashable

import numpy as np

Expand Down Expand Up @@ -208,7 +208,7 @@ def _get_keep_attrs(self, keep_attrs):

return keep_attrs

def _get_output_dim_selector(self) -> Dict[str, Any]:
def _get_output_dim_selector(self) -> Dict[Hashable, Any]:
"""Get output dimension selector, taking into account window size, window, centering, and padding.
If any of the dimensions are not padded, the output size can be shorter than the input size
Expand All @@ -229,7 +229,7 @@ def offsets_to_slice(start_offset: int, end_offset: int) -> slice:
offset = [not p for p in self.pad]
offsets = utils.get_pads(self.dim, self.window, self.center, offset)

selector: Dict[str, slice] = {
selector: Dict[Hashable, slice] = {
dim: offsets_to_slice(start_offset, end_offset)
for dim, (start_offset, end_offset) in offsets.items()
}
Expand Down

0 comments on commit b36a049

Please sign in to comment.