Skip to content

Commit d535a3b

Browse files
Run pyupgrade on core/groupby (#6351)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 229dad9 commit d535a3b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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
@@ -869,9 +871,9 @@ def _combine(self, applied, shortcut=False):
869871
def reduce(
870872
self,
871873
func: Callable[..., Any],
872-
dim: Union[None, Hashable, Sequence[Hashable]] = None,
874+
dim: None | Hashable | Sequence[Hashable] = None,
873875
*,
874-
axis: Union[None, int, Sequence[int]] = None,
876+
axis: None | int | Sequence[int] = None,
875877
keep_attrs: bool = None,
876878
keepdims: bool = False,
877879
shortcut: bool = True,
@@ -997,9 +999,9 @@ def _combine(self, applied):
997999
def reduce(
9981000
self,
9991001
func: Callable[..., Any],
1000-
dim: Union[None, Hashable, Sequence[Hashable]] = None,
1002+
dim: None | Hashable | Sequence[Hashable] = None,
10011003
*,
1002-
axis: Union[None, int, Sequence[int]] = None,
1004+
axis: None | int | Sequence[int] = None,
10031005
keep_attrs: bool = None,
10041006
keepdims: bool = False,
10051007
**kwargs: Any,

0 commit comments

Comments
 (0)