Skip to content

Commit baf98b8

Browse files
authored
TYP: mostly DataFrame return overloads (#56739)
* TYP: mostly DataFrame return overloads * remove keyword-only enforcement * revert keyword-only in NDFrame * revert revert * remove decorators in Series
1 parent 8871b1c commit baf98b8

File tree

5 files changed

+515
-45
lines changed

5 files changed

+515
-45
lines changed

pandas/core/base.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import (
99
TYPE_CHECKING,
1010
Any,
11+
Callable,
1112
Generic,
1213
Literal,
1314
cast,
@@ -104,7 +105,7 @@ class PandasObject(DirNamesMixin):
104105
_cache: dict[str, Any]
105106

106107
@property
107-
def _constructor(self):
108+
def _constructor(self) -> Callable[..., Self]:
108109
"""
109110
Class constructor (for this class it's just `__class__`).
110111
"""
@@ -800,7 +801,7 @@ def argmin(
800801
# "int")
801802
return result # type: ignore[return-value]
802803

803-
def tolist(self):
804+
def tolist(self) -> list:
804805
"""
805806
Return a list of the values.
806807

0 commit comments

Comments
 (0)