Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Aug 18, 2024
1 parent a8df5b9 commit 849169f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions uvicorn/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def asyncio_run(
except RuntimeError:
pass
else:
raise RuntimeError(
"asyncio.run() cannot be called from a running event loop"
)
raise RuntimeError("asyncio.run() cannot be called from a running event loop")

if not asyncio.iscoroutine(main):
raise ValueError(f"a coroutine was expected, got {main!r}")
Expand Down
4 changes: 1 addition & 3 deletions uvicorn/loops/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from collections.abc import Callable


def auto_loop_factory(
use_subprocess: bool = False,
) -> Callable[[], asyncio.AbstractEventLoop]:
def auto_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:
try:
import uvloop # noqa
except ImportError: # pragma: no cover
Expand Down
4 changes: 1 addition & 3 deletions uvicorn/loops/uvloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
import uvloop


def uvloop_loop_factory(
use_subprocess: bool = False,
) -> Callable[[], asyncio.AbstractEventLoop]:
def uvloop_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:
return uvloop.new_event_loop

0 comments on commit 849169f

Please sign in to comment.