Skip to content

Commit

Permalink
ignore mypy errors - redefining signature
Browse files Browse the repository at this point in the history
  • Loading branch information
biniona committed Oct 7, 2024
1 parent cc4c5e9 commit ee30e3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions minject/asyncio_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
# The '/' forces that "func" be passed positionally (I.E. first argument
# to to_thread). Users of this extension must be careful to pass the argument
# to "func" positionally, or there could be different behavior
# when using minject in python 3.7 and python 3.9+.
# when using minject in python 3.7 and python 3.9+. I need to add a "type: ignore"
# to avoid mypy errors related to defining function with a different signature.
# original asyncio source: "async def to_thread(func, /, *args, **kwargs):"
async def to_thread(func, *args, **kwargs):
async def to_thread(func, *args, **kwargs): # type: ignore
"""Asynchronously run function *func* in a separate thread.
Any *args and **kwargs supplied for this function are directly passed
Expand Down

0 comments on commit ee30e3c

Please sign in to comment.