@@ -209,14 +209,18 @@ class SeriesGroupBy(GroupBy[Series[S2]], Generic[S2, ByT]):
209
209
210
210
_TT = TypeVar ("_TT" , bound = Literal [True , False ])
211
211
212
- class DFCallable1 (Protocol ):
213
- def __call__ (self , df : DataFrame , / , * args , ** kwargs ) -> Scalar | list | dict : ...
212
+ class DFCallable1 (Protocol [P ]): # ty: ignore[invalid-argument-type]
213
+ def __call__ (
214
+ self , df : DataFrame , / , * args : P .args , ** kwargs : P .kwargs
215
+ ) -> Scalar | list | dict : ...
214
216
215
- class DFCallable2 (Protocol ):
216
- def __call__ (self , df : DataFrame , / , * args , ** kwargs ) -> DataFrame | Series : ...
217
+ class DFCallable2 (Protocol [P ]): # ty: ignore[invalid-argument-type]
218
+ def __call__ (
219
+ self , df : DataFrame , / , * args : P .args , ** kwargs : P .kwargs
220
+ ) -> DataFrame | Series : ...
217
221
218
- class DFCallable3 (Protocol ):
219
- def __call__ (self , df : Iterable , / , * args , ** kwargs ) -> float : ...
222
+ class DFCallable3 (Protocol [ P ]): # ty: ignore[invalid-argument-type]
223
+ def __call__ (self , df : Iterable , / , * args : P . args , ** kwargs : P . kwargs ) -> float : ...
220
224
221
225
class DataFrameGroupBy (GroupBy [DataFrame ], Generic [ByT , _TT ]):
222
226
# error: Overload 3 for "apply" will never be used because its parameters overlap overload 1
0 commit comments