mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +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:
@@ -3,7 +3,7 @@ import io
|
||||
import ssl
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import WriteableBuffer
|
||||
from _typeshed import Self, WriteableBuffer
|
||||
from socket import socket
|
||||
from typing import (
|
||||
IO,
|
||||
@@ -115,7 +115,7 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
def fileno(self) -> int: ...
|
||||
def isclosed(self) -> bool: ...
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __enter__(self) -> HTTPResponse: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[types.TracebackType]
|
||||
) -> Optional[bool]: ...
|
||||
|
||||
Reference in New Issue
Block a user