diff --git a/stubs/aiofiles/@tests/stubtest_allowlist.txt b/stubs/aiofiles/@tests/stubtest_allowlist.txt index 0a5668c9a..ea7fd914c 100644 --- a/stubs/aiofiles/@tests/stubtest_allowlist.txt +++ b/stubs/aiofiles/@tests/stubtest_allowlist.txt @@ -1,3 +1,8 @@ +# Some arguments only exist on FreeBSD and MacOS +aiofiles.os.sendfile + +# These all delegate using *args,**kwargs, but stubs use signature of +# method they are being delegated to. aiofiles.threadpool.binary.AsyncBufferedIOBase.close aiofiles.threadpool.binary.AsyncBufferedIOBase.detach aiofiles.threadpool.binary.AsyncBufferedIOBase.fileno diff --git a/stubs/aiofiles/METADATA.toml b/stubs/aiofiles/METADATA.toml index a6a1666f8..7431acfe0 100644 --- a/stubs/aiofiles/METADATA.toml +++ b/stubs/aiofiles/METADATA.toml @@ -1,3 +1 @@ version = "0.7.*" -requires = [] -stubtest = false # easily fixable, some platform differences between local and CI diff --git a/stubs/aiofiles/aiofiles/os.pyi b/stubs/aiofiles/aiofiles/os.pyi index b48884c44..f1bd47bf5 100644 --- a/stubs/aiofiles/aiofiles/os.pyi +++ b/stubs/aiofiles/aiofiles/os.pyi @@ -15,14 +15,14 @@ async def rmdir(path: StrOrBytesPath, *, dir_fd: int | None = ...) -> None: ... if sys.platform != "win32": @overload - async def sendfile(__out_fd: int, __in_fd: int, offset: int | None, count: int) -> int: ... + async def sendfile(out_fd: int, in_fd: int, offset: int | None, count: int) -> int: ... @overload async def sendfile( - __out_fd: int, - __in_fd: int, + out_fd: int, + in_fd: int, offset: int, count: int, headers: Sequence[bytes] = ..., trailers: Sequence[bytes] = ..., flags: int = ..., - ) -> int: ... + ) -> int: ... # FreeBSD and Mac OS X only