mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-05 01:17:39 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, Self
|
||||
from _typeshed import ReadableBuffer
|
||||
from collections.abc import Callable, Iterable
|
||||
from email.message import Message
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, BinaryIO
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["addbase", "addclosehook", "addinfo", "addinfourl"]
|
||||
|
||||
class addbase(BinaryIO):
|
||||
fp: IO[bytes]
|
||||
def __init__(self, fp: IO[bytes]) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __iter__(self: Self) -> Self: ...
|
||||
def __iter__(self) -> Self: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def close(self) -> None: ...
|
||||
# These methods don't actually exist, but the class inherits at runtime from
|
||||
|
||||
Reference in New Issue
Block a user