Skip to content

Commit

Permalink
restore missing uvloop members to uvloop typing
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Oct 14, 2023
1 parent 5ddf38b commit 0370a92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
12 changes: 12 additions & 0 deletions uvloop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
__all__ = ('new_event_loop', 'install', 'EventLoopPolicy')


_T = _typing.TypeVar("_T")


class Loop(__BaseLoop, __asyncio.AbstractEventLoop): # type: ignore[misc]
pass

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


@_typing.overload
def run(
main: _typing.Coroutine[_typing.Any, _typing.Any, _T],
*,
debug: _typing.Optional[bool] = ...,
loop_factory: _typing.Optional[_typing.Callable[[], Loop]] = ...,
) -> _T: ...


def run(main, *, loop_factory=new_event_loop, debug=None, **run_kwargs):
"""The preferred way of running a coroutine with uvloop."""

Expand Down
17 changes: 0 additions & 17 deletions uvloop/__init__.pyi

This file was deleted.

0 comments on commit 0370a92

Please sign in to comment.