Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.5.3
-
None
Description
Propagating the function signature for `func` in `DataFrame(...).transform(...)` would enable type checkers like `mypy` to enforce that `func` is being correctly called through `DataFrame(...).transform(...)`.
`ParamSpec` seems like a suitable approach for this:
P = ParamSpec("P") ... def transform( self, func: Callable[Concatenate["DataFrame", P], "DataFrame"], *args: P.args, **kwargs: P.kwargs, ) -> "DataFrame": ...
Attachments
Attachments
Issue Links
- links to