Skip to content

Commit

Permalink
fixed pylint docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiscauwel committed May 14, 2024
1 parent ba56e7a commit 642da2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/docker_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from src import config


def to_async(func):
def to_async[**P, R](func: Callable[P, R]) -> Callable[P, Awaitable[R]]:
"""Decorator to make a blocking sync function an awaitable async function."""
async def run_async(*args, **kwargs):
async def run_async(*args: P.args, **kwargs: P.kwargs) -> R:
return await asyncio.to_thread(func, *args, **kwargs)
return run_async

Expand Down

0 comments on commit 642da2e

Please sign in to comment.