Skip to content

Commit 0370a92

Browse files
committed
restore missing uvloop members to uvloop typing
1 parent 5ddf38b commit 0370a92

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

uvloop/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
__all__ = ('new_event_loop', 'install', 'EventLoopPolicy')
1414

1515

16+
_T = _typing.TypeVar("_T")
17+
18+
1619
class Loop(__BaseLoop, __asyncio.AbstractEventLoop): # type: ignore[misc]
1720
pass
1821

@@ -34,6 +37,15 @@ def install() -> None:
3437
__asyncio.set_event_loop_policy(EventLoopPolicy())
3538

3639

40+
@_typing.overload
41+
def run(
42+
main: _typing.Coroutine[_typing.Any, _typing.Any, _T],
43+
*,
44+
debug: _typing.Optional[bool] = ...,
45+
loop_factory: _typing.Optional[_typing.Callable[[], Loop]] = ...,
46+
) -> _T: ...
47+
48+
3749
def run(main, *, loop_factory=new_event_loop, debug=None, **run_kwargs):
3850
"""The preferred way of running a coroutine with uvloop."""
3951

uvloop/__init__.pyi

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)