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:
@@ -2,13 +2,13 @@ import gzip
|
||||
import http.client
|
||||
import sys
|
||||
import time
|
||||
from _typeshed import ReadableBuffer, Self, SupportsRead, SupportsWrite, _BufferWithLen
|
||||
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite, _BufferWithLen
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from datetime import datetime
|
||||
from io import BytesIO
|
||||
from types import TracebackType
|
||||
from typing import Any, Protocol, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
class _SupportsTimeTuple(Protocol):
|
||||
def timetuple(self) -> time.struct_time: ...
|
||||
@@ -312,7 +312,7 @@ class ServerProxy:
|
||||
def __call__(self, attr: Literal["transport"]) -> Transport: ...
|
||||
@overload
|
||||
def __call__(self, attr: str) -> Callable[[], None] | Transport: ...
|
||||
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