mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Use _typeshed.Self with __enter__ (#5723)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz> Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import gzip
|
||||
import http.client
|
||||
import sys
|
||||
import time
|
||||
from _typeshed import SupportsRead, SupportsWrite
|
||||
from _typeshed import Self, SupportsRead, SupportsWrite
|
||||
from datetime import datetime
|
||||
from io import BytesIO
|
||||
from types import TracebackType
|
||||
@@ -301,7 +301,7 @@ class ServerProxy:
|
||||
def __call__(self, attr: Literal["transport"]) -> Transport: ...
|
||||
@overload
|
||||
def __call__(self, attr: str) -> Union[Callable[[], None], Transport]: ...
|
||||
def __enter__(self) -> ServerProxy: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user