Skip to content

Commit 831481c

Browse files
committed
deprecate non-keyword args
1 parent 0f15b62 commit 831481c

File tree

2 files changed

+2
-44
lines changed

2 files changed

+2
-44
lines changed

pandas/core/frame.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -8642,28 +8642,7 @@ def aggregate(self, func=None, axis: Axis = 0, *args, **kwargs):
86428642

86438643
agg = aggregate
86448644

8645-
@overload
8646-
def any(
8647-
self: DataFrame,
8648-
axis: Axis = ...,
8649-
bool_only: bool | None = ...,
8650-
skipna: bool = ...,
8651-
level: None = ...,
8652-
**kwargs,
8653-
) -> Series:
8654-
...
8655-
8656-
@overload
8657-
def any(
8658-
self: DataFrame,
8659-
axis: Axis = ...,
8660-
bool_only: bool | None = ...,
8661-
skipna: bool = ...,
8662-
level: Level = ...,
8663-
**kwargs,
8664-
) -> DataFrame:
8665-
...
8666-
8645+
@deprecate_nonkeyword_arguments(version=None, allowed_args=["self"])
86678646
@doc(NDFrame.any, **_shared_doc_kwargs)
86688647
def any(
86698648
self: DataFrame,

pandas/core/series.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -4258,28 +4258,7 @@ def aggregate(self, func=None, axis=0, *args, **kwargs):
42584258

42594259
agg = aggregate
42604260

4261-
@overload
4262-
def any(
4263-
self: Series,
4264-
axis: Axis = ...,
4265-
bool_only: bool | None = ...,
4266-
skipna: bool = ...,
4267-
level: None = ...,
4268-
**kwargs,
4269-
) -> bool:
4270-
...
4271-
4272-
@overload
4273-
def any(
4274-
self: Series,
4275-
axis: Axis = ...,
4276-
bool_only: bool | None = ...,
4277-
skipna: bool = ...,
4278-
level: Level = ...,
4279-
**kwargs,
4280-
) -> Series:
4281-
...
4282-
4261+
@deprecate_nonkeyword_arguments(version=None, allowed_args=["self"])
42834262
@doc(NDFrame.any, **_shared_doc_kwargs)
42844263
def any(
42854264
self: Series,

0 commit comments

Comments
 (0)