mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use _typeshed.Self with __enter__ (#5717)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, WriteableBuffer
|
||||
from _typeshed import ReadableBuffer, Self, WriteableBuffer
|
||||
from collections.abc import Iterable
|
||||
from enum import IntEnum, IntFlag
|
||||
from io import RawIOBase
|
||||
@@ -545,7 +545,7 @@ class socket(_socket.socket):
|
||||
proto: int = ...,
|
||||
fileno: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def dup(self: _T) -> _T: ... # noqa: F811
|
||||
def accept(self) -> tuple[socket, _RetAddress]: ...
|
||||
|
||||
Reference in New Issue
Block a user