mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Remove aiofiles/tempfile/temptypes.pyi from pyright exclude (#9104)
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
"stdlib/xml/dom/minidom.pyi",
|
||||
"stdlib/xml/dom/pulldom.pyi",
|
||||
"stdlib/xml/sax",
|
||||
"stubs/aiofiles/aiofiles/tempfile/temptypes.pyi",
|
||||
"stubs/aiofiles/aiofiles/threadpool/utils.pyi",
|
||||
"stubs/annoy/annoy/annoylib.pyi",
|
||||
"stubs/aws-xray-sdk",
|
||||
|
||||
@@ -54,7 +54,6 @@ aiofiles.ospath.sameopenfile
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.fileno
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.flush
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.isatty
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.newlines
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.rollover
|
||||
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.tell
|
||||
aiofiles.tempfile.temptypes.AsyncTemporaryDirectory.cleanup
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from asyncio import AbstractEventLoop
|
||||
from collections.abc import Generator
|
||||
from collections.abc import Generator, Iterable
|
||||
from tempfile import TemporaryDirectory, _BytesMode
|
||||
from types import coroutine as coroutine
|
||||
from typing import TypeVar
|
||||
|
||||
@@ -18,29 +19,33 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
|
||||
def rollover(self) -> Generator[Incomplete, Incomplete, Incomplete]: ...
|
||||
async def flush(self) -> None: ...
|
||||
async def isatty(self) -> bool: ...
|
||||
async def read(self, __n: int = ...): ...
|
||||
async def readline(self, __limit: int | None = ...): ...
|
||||
async def readlines(self, __hint: int = ...): ...
|
||||
# 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 seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
async def tell(self) -> int: ...
|
||||
async def truncate(self, size: int | None = ...) -> None: ...
|
||||
@property
|
||||
def closed(self): ...
|
||||
def closed(self) -> bool: ...
|
||||
@property
|
||||
def encoding(self): ...
|
||||
def encoding(self) -> str: ...
|
||||
@property
|
||||
def mode(self): ...
|
||||
def mode(self) -> _BytesMode: ...
|
||||
@property
|
||||
def name(self): ...
|
||||
async def newlines(self): ...
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def softspace(self): ...
|
||||
async def write(self, s): ...
|
||||
async def writelines(self, iterable): ...
|
||||
def newlines(self) -> str: ...
|
||||
# Both should work with `AnyStr`, like in `tempfile`:
|
||||
async def write(self, s: Incomplete) -> int: ...
|
||||
async def writelines(self, iterable: Iterable[Incomplete]) -> None: ...
|
||||
|
||||
class AsyncTemporaryDirectory:
|
||||
async def cleanup(self) -> None: ...
|
||||
@property
|
||||
def name(self): ...
|
||||
def __init__(self, file, loop: AbstractEventLoop | None, executor: Incomplete | None) -> None: ...
|
||||
def name(self) -> Incomplete: ... # should be `AnyStr`
|
||||
def __init__(
|
||||
self, file: TemporaryDirectory[Incomplete], loop: AbstractEventLoop | None, executor: Incomplete | None
|
||||
) -> None: ...
|
||||
async def close(self) -> None: ...
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from collections.abc import Callable
|
||||
from types import coroutine as coroutine
|
||||
from typing import TypeVar
|
||||
|
||||
def delegate_to_executor(*attrs): ...
|
||||
def proxy_method_directly(*attrs): ...
|
||||
def proxy_property_directly(*attrs): ...
|
||||
def cond_delegate_to_executor(*attrs): ...
|
||||
_T = TypeVar("_T", bound=type)
|
||||
|
||||
# All these function actually mutate the given type:
|
||||
def delegate_to_executor(*attrs: str) -> Callable[[_T], _T]: ...
|
||||
def proxy_method_directly(*attrs: str) -> Callable[[_T], _T]: ...
|
||||
def proxy_property_directly(*attrs: str) -> Callable[[_T], _T]: ...
|
||||
def cond_delegate_to_executor(*attrs: str) -> Callable[[_T], _T]: ...
|
||||
|
||||
Reference in New Issue
Block a user