Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/aiofiles/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "24.1.*"
version = "25.1.*"
upstream_repository = "https://github.com/Tinche/aiofiles"

[tool.stubtest]
Expand Down
2 changes: 2 additions & 0 deletions stubs/aiofiles/aiofiles/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ from typing_extensions import Self
_T = TypeVar("_T")
_V_co = TypeVar("_V_co", covariant=True)

def wrap(func: Callable[..., _T]) -> Callable[..., Awaitable[_T]]: ...

class AsyncBase(Generic[_T]):
def __init__(self, file: TextIO | BinaryIO | None, loop: AbstractEventLoop | None, executor: Executor | None) -> None: ...
def __aiter__(self) -> Self: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/aiofiles/aiofiles/os.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ from os import _ScandirIterator, stat_result
from typing import AnyStr, overload

from aiofiles import ospath
from aiofiles.ospath import wrap as wrap
from aiofiles.base import wrap as wrap

__all__ = [
"path",
Expand Down
19 changes: 15 additions & 4 deletions stubs/aiofiles/aiofiles/ospath.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
from _typeshed import FileDescriptorOrPath
from asyncio.events import AbstractEventLoop
from collections.abc import Awaitable, Callable
from concurrent.futures import Executor
from os import PathLike
from typing import AnyStr, TypeVar
from typing import AnyStr

_R = TypeVar("_R")
__all__ = [
"abspath",
"getatime",
"getctime",
"getmtime",
"getsize",
"exists",
"isdir",
"isfile",
"islink",
"ismount",
"samefile",
"sameopenfile",
]

def wrap(func: Callable[..., _R]) -> Callable[..., Awaitable[_R]]: ...
async def exists(
path: FileDescriptorOrPath, *, loop: AbstractEventLoop | None = ..., executor: Executor | None = ...
) -> bool: ...
Expand Down