mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import queue
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self, SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT
|
||||
from _typeshed import SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping, MutableSequence, Sequence
|
||||
from types import TracebackType
|
||||
from typing import Any, AnyStr, ClassVar, Generic, TypeVar, overload
|
||||
from typing_extensions import SupportsIndex, TypeAlias
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
|
||||
from .connection import Connection
|
||||
from .context import BaseContext
|
||||
@@ -116,8 +116,8 @@ class BaseListProxy(BaseProxy, MutableSequence[_T]):
|
||||
def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = ...) -> None: ...
|
||||
|
||||
class ListProxy(BaseListProxy[_T]):
|
||||
def __iadd__(self: Self, __x: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
def __imul__(self: Self, __n: SupportsIndex) -> Self: ... # type: ignore[override]
|
||||
def __iadd__(self, __x: Iterable[_T]) -> Self: ... # type: ignore[override]
|
||||
def __imul__(self, __n: SupportsIndex) -> Self: ... # type: ignore[override]
|
||||
|
||||
# Returned by BaseManager.get_server()
|
||||
class Server:
|
||||
@@ -165,7 +165,7 @@ class BaseManager:
|
||||
method_to_typeid: Mapping[str, str] | None = None,
|
||||
create_method: bool = True,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user