diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index d16ffbca16a3d..1c18ef891b8c5 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -7,7 +7,7 @@ """ import collections -from typing import Dict, Hashable, List, Optional, Sequence, Tuple, Type +from typing import Dict, Generic, Hashable, List, Optional, Sequence, Tuple, Type import numpy as np @@ -866,7 +866,7 @@ def _is_indexed_like(obj, axes, axis: int) -> bool: # Splitting / application -class DataSplitter: +class DataSplitter(Generic[FrameOrSeries]): def __init__(self, data: FrameOrSeries, labels, ngroups: int, axis: int = 0): self.data = data self.labels = ensure_int64(labels) diff --git a/setup.cfg b/setup.cfg index 8ec10e7db5a5c..ee28646d722f2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -172,9 +172,6 @@ check_untyped_defs=False [mypy-pandas.core.groupby.grouper] check_untyped_defs=False -[mypy-pandas.core.groupby.ops] -check_untyped_defs=False - [mypy-pandas.core.indexes.base] check_untyped_defs=False