Skip to content

Commit 705b3f0

Browse files
committed
Merge remote-tracking branch 'upstream/main' into groupby-aggs-using-numpy-groupies
* upstream/main: Run pyupgrade on core/groupby (pydata#6351)
2 parents 26d85d5 + d535a3b commit 705b3f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: xarray/core/groupby.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
from __future__ import annotations
2+
13
import datetime
24
import warnings
3-
from typing import Any, Callable, Hashable, Sequence, Union
5+
from typing import Any, Callable, Hashable, Sequence
46

57
import numpy as np
68
import pandas as pd
@@ -982,9 +984,9 @@ def _combine(self, applied, shortcut=False):
982984
def reduce(
983985
self,
984986
func: Callable[..., Any],
985-
dim: Union[None, Hashable, Sequence[Hashable]] = None,
987+
dim: None | Hashable | Sequence[Hashable] = None,
986988
*,
987-
axis: Union[None, int, Sequence[int]] = None,
989+
axis: None | int | Sequence[int] = None,
988990
keep_attrs: bool = None,
989991
keepdims: bool = False,
990992
shortcut: bool = True,
@@ -1110,9 +1112,9 @@ def _combine(self, applied):
11101112
def reduce(
11111113
self,
11121114
func: Callable[..., Any],
1113-
dim: Union[None, Hashable, Sequence[Hashable]] = None,
1115+
dim: None | Hashable | Sequence[Hashable] = None,
11141116
*,
1115-
axis: Union[None, int, Sequence[int]] = None,
1117+
axis: None | int | Sequence[int] = None,
11161118
keep_attrs: bool = None,
11171119
keepdims: bool = False,
11181120
**kwargs: Any,

0 commit comments

Comments
 (0)