Skip to content

Commit 37eff5a

Browse files
committed
more typing
1 parent 1bed8ff commit 37eff5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xarray/core/resample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import warnings
44
from collections.abc import Callable, Hashable, Iterable, Sequence
5-
from typing import TYPE_CHECKING, Any
5+
from typing import TYPE_CHECKING, Any, Literal
66

77
from xarray.core._aggregations import (
88
DataArrayResampleAggregations,
@@ -104,7 +104,7 @@ def shuffle_to_chunks(self, chunks: T_Chunks = None):
104104
return self._shuffle_obj(chunks).drop_vars(RESAMPLE_DIM)
105105

106106
def _first_or_last(
107-
self, op: str, skipna: bool | None, keep_attrs: bool | None
107+
self, op: Literal["first", "last"], skipna: bool | None, keep_attrs: bool | None
108108
) -> T_Xarray:
109109
from xarray.core.dataset import Dataset
110110

0 commit comments

Comments
 (0)