mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-12 19:12:31 +08:00
This reverts commit 57d7c4334b.
The attempted fix loses all type overload information during type
inferencing, so postpone fixing the issue until we have a solution
which doesn't impose such a dramatic loss in functionality.
Reopens #13403
This commit is contained in:
@@ -7,6 +7,7 @@ from re import Pattern
|
||||
from typing import Any, Literal, TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
_C = TypeVar("_C", bound=Callable[..., Any])
|
||||
_Func = TypeVar("_Func", bound=Callable[..., Any])
|
||||
_T = TypeVar("_T")
|
||||
_P = ParamSpec("_P")
|
||||
@@ -64,7 +65,8 @@ def decorator(
|
||||
caller: Callable[..., Any], _func: Callable[..., Any] | None = ...
|
||||
) -> Callable[[Callable[..., Any]], Callable[..., Any]]: ...
|
||||
|
||||
class ContextManager(_GeneratorContextManager[_T]): ...
|
||||
class ContextManager(_GeneratorContextManager[_T]):
|
||||
def __call__(self, func: _C) -> _C: ...
|
||||
|
||||
def contextmanager(func: Callable[_P, Iterator[_T]]) -> Callable[_P, ContextManager[_T]]: ...
|
||||
def append(a: type, vancestors: list[type]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user