mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-29 03:06:43 +08:00
Enable Ruff PLC (Pylint Convention) (#13306)
This commit is contained in:
+7
-7
@@ -510,15 +510,15 @@ class Awaitable(Protocol[_T_co]):
|
||||
def __await__(self) -> Generator[Any, Any, _T_co]: ...
|
||||
|
||||
# Non-default variations to accommodate couroutines, and `AwaitableGenerator` having a 4th type parameter.
|
||||
_SendT_contra_nd = TypeVar("_SendT_contra_nd", contravariant=True)
|
||||
_ReturnT_co_nd = TypeVar("_ReturnT_co_nd", covariant=True)
|
||||
_SendT_nd_contra = TypeVar("_SendT_nd_contra", contravariant=True)
|
||||
_ReturnT_nd_co = TypeVar("_ReturnT_nd_co", covariant=True)
|
||||
|
||||
class Coroutine(Awaitable[_ReturnT_co_nd], Generic[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd]):
|
||||
class Coroutine(Awaitable[_ReturnT_nd_co], Generic[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co]):
|
||||
__name__: str
|
||||
__qualname__: str
|
||||
|
||||
@abstractmethod
|
||||
def send(self, value: _SendT_contra_nd, /) -> _YieldT_co: ...
|
||||
def send(self, value: _SendT_nd_contra, /) -> _YieldT_co: ...
|
||||
@overload
|
||||
@abstractmethod
|
||||
def throw(
|
||||
@@ -534,9 +534,9 @@ class Coroutine(Awaitable[_ReturnT_co_nd], Generic[_YieldT_co, _SendT_contra_nd,
|
||||
# The parameters correspond to Generator, but the 4th is the original type.
|
||||
@type_check_only
|
||||
class AwaitableGenerator(
|
||||
Awaitable[_ReturnT_co_nd],
|
||||
Generator[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd],
|
||||
Generic[_YieldT_co, _SendT_contra_nd, _ReturnT_co_nd, _S],
|
||||
Awaitable[_ReturnT_nd_co],
|
||||
Generator[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co],
|
||||
Generic[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co, _S],
|
||||
metaclass=ABCMeta,
|
||||
): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user