Skip to content

Commit 338fd56

Browse files
twoertweinyehoshuadimarsky
authored andcommitted
TYP: NDFrame.min/max mypy workaround (pandas-dev#47197)
1 parent 32231b6 commit 338fd56

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pandas/core/generic.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -11287,8 +11287,7 @@ def median(
1128711287

1128811288
setattr(cls, "median", median)
1128911289

11290-
# error: Untyped decorator makes function "max" untyped
11291-
@doc( # type: ignore[misc]
11290+
@doc(
1129211291
_num_doc,
1129311292
desc="Return the maximum of the values over the requested axis.\n\n"
1129411293
"If you want the *index* of the maximum, use ``idxmax``. This is "
@@ -11312,8 +11311,7 @@ def max(
1131211311

1131311312
setattr(cls, "max", max)
1131411313

11315-
# error: Untyped decorator makes function "max" untyped
11316-
@doc( # type: ignore[misc]
11314+
@doc(
1131711315
_num_doc,
1131811316
desc="Return the minimum of the values over the requested axis.\n\n"
1131911317
"If you want the *index* of the minimum, use ``idxmin``. This is "
@@ -12215,11 +12213,11 @@ def _doc_params(cls):
1221512213
>>> pd.Series([np.nan]).sum(min_count=1)
1221612214
nan"""
1221712215

12218-
_max_examples = _shared_docs["stat_func_example"].format(
12216+
_max_examples: str = _shared_docs["stat_func_example"].format(
1221912217
stat_func="max", verb="Max", default_output=8, level_output_0=4, level_output_1=8
1222012218
)
1222112219

12222-
_min_examples = _shared_docs["stat_func_example"].format(
12220+
_min_examples: str = _shared_docs["stat_func_example"].format(
1222312221
stat_func="min", verb="Min", default_output=0, level_output_0=2, level_output_1=0
1222412222
)
1222512223

0 commit comments

Comments
 (0)