Skip to content

Commit

Permalink
test xs suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
biniona committed Oct 9, 2024
1 parent ae6c0d3 commit 625f650
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions minject/asyncio_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
are not available in Python 3.7.
"""

try:
# Python 3.7 mypy raises attr-defined error for to_thread, so
# we must ignore it here.
from asyncio import to_thread # type: ignore[attr-defined]
import asyncio

if hasattr(asyncio, "to_thread"):
from asyncio import to_thread
# This is copy pasted from here: https://github.com/python/cpython/blob/03775472cc69e150ced22dc30334a7a202fc0380/Lib/asyncio/threads.py#L1-L25
except ImportError:
else:
"""High-level support for working with threads in asyncio"""

import contextvars
Expand Down

0 comments on commit 625f650

Please sign in to comment.