mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix contextlib.ContextDecorator.__call__ types (#4399)
The decorated function returned by ContextDecorator.__call__ has the same call signature as the original function. Closes #4382.
This commit is contained in:
committed by
GitHub
parent
de4ea8681d
commit
10a5b070ab
@@ -64,7 +64,7 @@ if sys.version_info >= (3, 5):
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
class ContextDecorator:
|
||||
def __call__(self, func: Callable[..., None]) -> Callable[..., ContextManager[None]]: ...
|
||||
def __call__(self, func: _F) -> _F: ...
|
||||
_U = TypeVar("_U", bound=ExitStack)
|
||||
class ExitStack(ContextManager[ExitStack]):
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user