Skip to content

Commit 063d9b3

Browse files
author
qorexdev
committed
add aiofiles.threadpool.wrap to type stubs
Expose the singledispatch `wrap` function in aiofiles.threadpool stubs. This was missing, causing mypy attr-defined errors when accessing threadpool.wrap or calling wrap.register(). Closes #15624
1 parent 5632132 commit 063d9b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stubs/aiofiles/aiofiles/threadpool/__init__.pyi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ from _typeshed import (
99
from asyncio import AbstractEventLoop
1010
from collections.abc import Callable
1111
from concurrent.futures import Executor
12-
from typing import Literal, overload
12+
from functools import _SingleDispatchCallable
13+
from typing import Any, Literal, overload
1314
from typing_extensions import TypeAlias
1415

1516
from ..base import AiofilesContextManager
@@ -98,6 +99,8 @@ def open(
9899
executor: Executor | None = None,
99100
) -> AiofilesContextManager[_UnknownAsyncBinaryIO]: ...
100101

102+
wrap: _SingleDispatchCallable[Any]
103+
101104
stdin: AsyncTextIndirectIOWrapper
102105
stdout: AsyncTextIndirectIOWrapper
103106
stderr: AsyncTextIndirectIOWrapper

0 commit comments

Comments
 (0)