mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-18 06:19:47 +08:00
Use PEP 570 syntax in third party stubs (#11554)
This commit is contained in:
@@ -20,9 +20,9 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
# All must return `AnyStr`:
|
||||
async def read(self, __n: int = ...) -> Incomplete: ...
|
||||
async def readline(self, __limit: int | None = ...) -> Incomplete: ...
|
||||
async def readlines(self, __hint: int = ...) -> list[Incomplete]: ...
|
||||
async def read(self, n: int = ..., /) -> Incomplete: ...
|
||||
async def readline(self, limit: int | None = ..., /) -> Incomplete: ...
|
||||
async def readlines(self, hint: int = ..., /) -> list[Incomplete]: ...
|
||||
# ---
|
||||
async def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
async def tell(self) -> int: ...
|
||||
|
||||
@@ -10,17 +10,17 @@ class _UnknownAsyncBinaryIO(AsyncBase[bytes]):
|
||||
async def close(self) -> None: ...
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
async def read(self, __size: int = ...) -> bytes: ...
|
||||
async def readinto(self, __buffer: WriteableBuffer) -> int | None: ...
|
||||
async def readline(self, __size: int | None = ...) -> bytes: ...
|
||||
async def readlines(self, __hint: int = ...) -> list[bytes]: ...
|
||||
async def seek(self, __offset: int, __whence: int = ...) -> int: ...
|
||||
async def read(self, size: int = ..., /) -> bytes: ...
|
||||
async def readinto(self, buffer: WriteableBuffer, /) -> int | None: ...
|
||||
async def readline(self, size: int | None = ..., /) -> bytes: ...
|
||||
async def readlines(self, hint: int = ..., /) -> list[bytes]: ...
|
||||
async def seek(self, offset: int, whence: int = ..., /) -> int: ...
|
||||
async def seekable(self) -> bool: ...
|
||||
async def tell(self) -> int: ...
|
||||
async def truncate(self, __size: int | None = ...) -> int: ...
|
||||
async def truncate(self, size: int | None = ..., /) -> int: ...
|
||||
async def writable(self) -> bool: ...
|
||||
async def write(self, __b: ReadableBuffer) -> int: ...
|
||||
async def writelines(self, __lines: Iterable[ReadableBuffer]) -> None: ...
|
||||
async def write(self, b: ReadableBuffer, /) -> int: ...
|
||||
async def writelines(self, lines: Iterable[ReadableBuffer], /) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def readable(self) -> bool: ...
|
||||
@property
|
||||
@@ -31,22 +31,22 @@ class _UnknownAsyncBinaryIO(AsyncBase[bytes]):
|
||||
def name(self) -> FileDescriptorOrPath: ...
|
||||
|
||||
class AsyncBufferedIOBase(_UnknownAsyncBinaryIO):
|
||||
async def read1(self, __size: int = ...) -> bytes: ...
|
||||
async def read1(self, size: int = ..., /) -> bytes: ...
|
||||
def detach(self) -> FileIO: ...
|
||||
@property
|
||||
def raw(self) -> FileIO: ...
|
||||
|
||||
class AsyncIndirectBufferedIOBase(AsyncIndirectBase[bytes], _UnknownAsyncBinaryIO):
|
||||
async def read1(self, __size: int = ...) -> bytes: ...
|
||||
async def read1(self, size: int = ..., /) -> bytes: ...
|
||||
def detach(self) -> FileIO: ...
|
||||
@property
|
||||
def raw(self) -> FileIO: ...
|
||||
|
||||
class AsyncBufferedReader(AsyncBufferedIOBase):
|
||||
async def peek(self, __size: int = ...) -> bytes: ...
|
||||
async def peek(self, size: int = ..., /) -> bytes: ...
|
||||
|
||||
class AsyncIndirectBufferedReader(AsyncIndirectBufferedIOBase):
|
||||
async def peek(self, __size: int = ...) -> bytes: ...
|
||||
async def peek(self, size: int = ..., /) -> bytes: ...
|
||||
|
||||
class AsyncFileIO(_UnknownAsyncBinaryIO):
|
||||
async def readall(self) -> bytes: ...
|
||||
|
||||
@@ -8,16 +8,16 @@ class _UnknownAsyncTextIO(AsyncBase[str]):
|
||||
async def close(self) -> None: ...
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
async def read(self, __size: int | None = ...) -> str: ...
|
||||
async def readline(self, __size: int = ...) -> str: ...
|
||||
async def readlines(self, __hint: int = ...) -> list[str]: ...
|
||||
async def seek(self, __offset: int, __whence: int = ...) -> int: ...
|
||||
async def read(self, size: int | None = ..., /) -> str: ...
|
||||
async def readline(self, size: int = ..., /) -> str: ...
|
||||
async def readlines(self, hint: int = ..., /) -> list[str]: ...
|
||||
async def seek(self, offset: int, whence: int = ..., /) -> int: ...
|
||||
async def seekable(self) -> bool: ...
|
||||
async def tell(self) -> int: ...
|
||||
async def truncate(self, __size: int | None = ...) -> int: ...
|
||||
async def truncate(self, size: int | None = ..., /) -> int: ...
|
||||
async def writable(self) -> bool: ...
|
||||
async def write(self, __b: str) -> int: ...
|
||||
async def writelines(self, __lines: Iterable[str]) -> None: ...
|
||||
async def write(self, b: str, /) -> int: ...
|
||||
async def writelines(self, lines: Iterable[str], /) -> None: ...
|
||||
def detach(self) -> BinaryIO: ...
|
||||
def fileno(self) -> int: ...
|
||||
def readable(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user