Skip to content

Commit 7dab469

Browse files
simonjayhawkinsAlexKirko
authored andcommitted
TYP: misc cleanup in core\groupby\generic.py (pandas-dev#35955)
1 parent a97623a commit 7dab469

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/groupby/generic.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import copy
1010
from functools import partial
1111
from textwrap import dedent
12-
import typing
1312
from typing import (
1413
TYPE_CHECKING,
1514
Any,
@@ -22,6 +21,7 @@
2221
Optional,
2322
Sequence,
2423
Type,
24+
TypeVar,
2525
Union,
2626
)
2727
import warnings
@@ -92,7 +92,7 @@
9292
# TODO: validate types on ScalarResult and move to _typing
9393
# Blocked from using by https://github.com/python/mypy/issues/1484
9494
# See note at _mangle_lambda_list
95-
ScalarResult = typing.TypeVar("ScalarResult")
95+
ScalarResult = TypeVar("ScalarResult")
9696

9797

9898
def generate_property(name: str, klass: Type[FrameOrSeries]):
@@ -606,8 +606,8 @@ def filter(self, func, dropna=True, *args, **kwargs):
606606
wrapper = lambda x: func(x, *args, **kwargs)
607607

608608
# Interpret np.nan as False.
609-
def true_and_notna(x, *args, **kwargs) -> bool:
610-
b = wrapper(x, *args, **kwargs)
609+
def true_and_notna(x) -> bool:
610+
b = wrapper(x)
611611
return b and notna(b)
612612

613613
try:
@@ -1210,7 +1210,7 @@ def _wrap_applied_output(self, keys, values, not_indexed_same=False):
12101210
# TODO: Remove when default dtype of empty Series is object
12111211
kwargs = first_not_none._construct_axes_dict()
12121212
backup = create_series_with_explicit_dtype(
1213-
**kwargs, dtype_if_empty=object
1213+
dtype_if_empty=object, **kwargs
12141214
)
12151215

12161216
values = [x if (x is not None) else backup for x in values]

0 commit comments

Comments
 (0)