mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 18:36:31 +08:00
Enable Ruff PLC (Pylint Convention) (#13306)
This commit is contained in:
@@ -33,7 +33,7 @@ _T_co = TypeVar("_T_co", covariant=True)
|
||||
_T_io = TypeVar("_T_io", bound=IO[str] | None)
|
||||
_ExitT_co = TypeVar("_ExitT_co", covariant=True, bound=bool | None, default=bool | None)
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_G = TypeVar("_G", bound=Generator[Any, Any, Any] | AsyncGenerator[Any, Any], covariant=True)
|
||||
_G_co = TypeVar("_G_co", bound=Generator[Any, Any, Any] | AsyncGenerator[Any, Any], covariant=True)
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
_SendT_contra = TypeVar("_SendT_contra", contravariant=True, default=None)
|
||||
@@ -68,11 +68,11 @@ class ContextDecorator:
|
||||
def _recreate_cm(self) -> Self: ...
|
||||
def __call__(self, func: _F) -> _F: ...
|
||||
|
||||
class _GeneratorContextManagerBase(Generic[_G]):
|
||||
class _GeneratorContextManagerBase(Generic[_G_co]):
|
||||
# Ideally this would use ParamSpec, but that requires (*args, **kwargs), which this isn't. see #6676
|
||||
def __init__(self, func: Callable[..., _G], args: tuple[Any, ...], kwds: dict[str, Any]) -> None: ...
|
||||
gen: _G
|
||||
func: Callable[..., _G]
|
||||
def __init__(self, func: Callable[..., _G_co], args: tuple[Any, ...], kwds: dict[str, Any]) -> None: ...
|
||||
gen: _G_co
|
||||
func: Callable[..., _G_co]
|
||||
args: tuple[Any, ...]
|
||||
kwds: dict[str, Any]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user