@@ -1140,7 +1140,7 @@ def clear(self) -> None:
1140
1140
1141
1141
def _apply (
1142
1142
self ,
1143
- func : Callable [..., Styler ] ,
1143
+ func : Callable ,
1144
1144
axis : Axis | None = 0 ,
1145
1145
subset : Subset | None = None ,
1146
1146
** kwargs ,
@@ -1195,7 +1195,7 @@ def _apply(
1195
1195
1196
1196
def apply (
1197
1197
self ,
1198
- func : Callable [..., Styler ] ,
1198
+ func : Callable ,
1199
1199
axis : Axis | None = 0 ,
1200
1200
subset : Subset | None = None ,
1201
1201
** kwargs ,
@@ -1290,7 +1290,7 @@ def apply(
1290
1290
1291
1291
def _apply_index (
1292
1292
self ,
1293
- func : Callable [..., Styler ] ,
1293
+ func : Callable ,
1294
1294
axis : int | str = 0 ,
1295
1295
level : Level | list [Level ] | None = None ,
1296
1296
method : str = "apply" ,
@@ -1325,7 +1325,7 @@ def _apply_index(
1325
1325
)
1326
1326
def apply_index (
1327
1327
self ,
1328
- func : Callable [..., Styler ] ,
1328
+ func : Callable ,
1329
1329
axis : int | str = 0 ,
1330
1330
level : Level | list [Level ] | None = None ,
1331
1331
** kwargs ,
@@ -1411,7 +1411,7 @@ def apply_index(
1411
1411
)
1412
1412
def applymap_index (
1413
1413
self ,
1414
- func : Callable [..., Styler ] ,
1414
+ func : Callable ,
1415
1415
axis : int | str = 0 ,
1416
1416
level : Level | list [Level ] | None = None ,
1417
1417
** kwargs ,
@@ -2597,11 +2597,7 @@ def f(data: DataFrame, props: str) -> np.ndarray:
2597
2597
2598
2598
if props is None :
2599
2599
props = f"background-color: { null_color } ;"
2600
- # error: Argument 1 to "apply" of "Styler" has incompatible type
2601
- # "Callable[[DataFrame, str], ndarray]"; expected "Callable[..., Styler]"
2602
- return self .apply (
2603
- f , axis = None , subset = subset , props = props # type: ignore[arg-type]
2604
- )
2600
+ return self .apply (f , axis = None , subset = subset , props = props )
2605
2601
2606
2602
def highlight_max (
2607
2603
self ,
@@ -2645,10 +2641,8 @@ def highlight_max(
2645
2641
2646
2642
if props is None :
2647
2643
props = f"background-color: { color } ;"
2648
- # error: Argument 1 to "apply" of "Styler" has incompatible type
2649
- # "Callable[[FrameOrSeries, str], ndarray]"; expected "Callable[..., Styler]"
2650
2644
return self .apply (
2651
- partial (_highlight_value , op = "max" ), # type: ignore[arg-type]
2645
+ partial (_highlight_value , op = "max" ),
2652
2646
axis = axis ,
2653
2647
subset = subset ,
2654
2648
props = props ,
@@ -2696,10 +2690,8 @@ def highlight_min(
2696
2690
2697
2691
if props is None :
2698
2692
props = f"background-color: { color } ;"
2699
- # error: Argument 1 to "apply" of "Styler" has incompatible type
2700
- # "Callable[[FrameOrSeries, str], ndarray]"; expected "Callable[..., Styler]"
2701
2693
return self .apply (
2702
- partial (_highlight_value , op = "min" ), # type: ignore[arg-type]
2694
+ partial (_highlight_value , op = "min" ),
2703
2695
axis = axis ,
2704
2696
subset = subset ,
2705
2697
props = props ,
@@ -2805,7 +2797,7 @@ def highlight_between(
2805
2797
if props is None :
2806
2798
props = f"background-color: { color } ;"
2807
2799
return self .apply (
2808
- _highlight_between , # type: ignore[arg-type]
2800
+ _highlight_between ,
2809
2801
axis = axis ,
2810
2802
subset = subset ,
2811
2803
props = props ,
@@ -2911,7 +2903,7 @@ def highlight_quantile(
2911
2903
if props is None :
2912
2904
props = f"background-color: { color } ;"
2913
2905
return self .apply (
2914
- _highlight_between , # type: ignore[arg-type]
2906
+ _highlight_between ,
2915
2907
axis = axis_apply ,
2916
2908
subset = subset ,
2917
2909
props = props ,
0 commit comments