Skip to content

Commit

Permalink
Fix mypy issue with uvloop
Browse files Browse the repository at this point in the history
Issue: MagicStack/uvloop#575. Can
revert when underlying issue fixed.
  • Loading branch information
vkottler committed Oct 15, 2023
1 parent 50e5bef commit 5f380d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ no_implicit_optional = False
disallow_incomplete_defs = False
disallow_untyped_defs = False

# Remove me.
warn_unused_ignores = False

[mypy-setup]
warn_unused_ignores = False

Expand Down
5 changes: 3 additions & 2 deletions vcorelib/asyncio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,12 @@ def try_uvloop_runner(
# type: ignore[attr-defined,unused-ignore]
eloop = stack.enter_context(
getattr(_asyncio, "Runner")(
debug=debug, loop_factory=uvloop.new_event_loop
debug=debug,
loop_factory=uvloop.new_event_loop, # type: ignore
)
).get_loop()
except AttributeError: # pragma: nocover
uvloop.install()
uvloop.install() # type: ignore

yield normalize_eloop(eloop)

Expand Down

0 comments on commit 5f380d4

Please sign in to comment.