Skip to content

Commit eb7d12a

Browse files
committed
correct type for decorator
1 parent 5b5508d commit eb7d12a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/util/_decorators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def wrapper(*args, **kwargs) -> Callable[..., Any]:
245245
return decorate
246246

247247

248-
def doc(*args: Union[str, Callable], **kwargs: str) -> Callable[[Callable], Callable]:
248+
def doc(*args: Union[str, Callable], **kwargs: str) -> Callable[[F], F]:
249249
"""
250250
A decorator take docstring templates, concatenate them and perform string
251251
substitution on it.
@@ -265,7 +265,7 @@ def doc(*args: Union[str, Callable], **kwargs: str) -> Callable[[Callable], Call
265265
The string which would be used to format docstring template.
266266
"""
267267

268-
def decorator(call: Callable) -> Callable:
268+
def decorator(call: F) -> F:
269269
# collecting docstring and docstring templates
270270
docstring_components: List[Union[str, Callable]] = []
271271
if call.__doc__:

0 commit comments

Comments
 (0)