Remove bare Incomplete annotations in third-party stubs (#11671)

This commit is contained in:
Sebastian Rittau
2024-03-31 03:34:51 +02:00
committed by GitHub
parent 6cb57b5f26
commit 33de88879f
33 changed files with 76 additions and 99 deletions

View File

@@ -256,4 +256,4 @@ def TemporaryDirectory(
) -> AiofilesContextManagerTempDir[None, None, AsyncTemporaryDirectory]: ...
class AiofilesContextManagerTempDir(AiofilesContextManager[_T_co, _T_contra, _V_co]):
async def __aenter__(self) -> Incomplete: ...
async def __aenter__(self): ...

View File

@@ -20,8 +20,8 @@ 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 read(self, n: int = ..., /): ...
async def readline(self, limit: int | None = ..., /): ...
async def readlines(self, hint: int = ..., /) -> list[Incomplete]: ...
# ---
async def seek(self, offset: int, whence: int = ...) -> int: ...
@@ -38,13 +38,13 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
@property
def newlines(self) -> str: ...
# Both should work with `AnyStr`, like in `tempfile`:
async def write(self, s: Incomplete) -> int: ...
async def write(self, s) -> int: ...
async def writelines(self, iterable: Iterable[Incomplete]) -> None: ...
class AsyncTemporaryDirectory:
async def cleanup(self) -> None: ...
@property
def name(self) -> Incomplete: ... # should be `AnyStr`
def name(self): ... # should be `AnyStr`
def __init__(
self, file: TemporaryDirectory[Incomplete], loop: AbstractEventLoop | None, executor: Incomplete | None
) -> None: ...