From 203ca4058ea391434ea8bb2dcf8aa2f9e17af9ad Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Tue, 6 Oct 2020 18:45:55 +0100 Subject: [PATCH] TYP: check_untyped_defs core.groupby.ops --- pandas/core/groupby/ops.py | 4 ++-- setup.cfg | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index 6051aa3022da1..697c25600d959 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -7,7 +7,7 @@ """ import collections -from typing import List, Optional, Sequence, Tuple, Type +from typing import Generic, 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 e125eea226b10..698e90ed7623d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -178,9 +178,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