From 2e8f28527db794f3373cc8029ccb79cc665b7ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Miller=20=28=E9=94=BA=E4=BF=8A=29?= Date: Mon, 15 May 2023 21:28:41 +0800 Subject: [PATCH] docs: update Docstring --- python_boilerplate/common/asynchronization.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python_boilerplate/common/asynchronization.py b/python_boilerplate/common/asynchronization.py index f22d502..a25189a 100644 --- a/python_boilerplate/common/asynchronization.py +++ b/python_boilerplate/common/asynchronization.py @@ -42,12 +42,12 @@ def async_function(func: Callable[..., R]) -> Callable[..., Future[R]]: * a function that accepts one integer argument: >>> @async_function - >>> def an_async_function(a_int: int): + >>> def an_async_function(a_int: int) -> None: >>> pass * a function without argument: >>> @async_function - >>> def an_async_function(): + >>> def an_async_function() -> None: >>> pass https://stackoverflow.com/questions/37203950/decorator-for-extra-thread @@ -97,12 +97,12 @@ def async_function_wrapper(func: Callable[..., Any]) -> Callable[..., Task[Any]] * a function that accepts one integer argument: >>> @async_function_wrapper - >>> async def an_async_function(a_int: int): + >>> async def an_async_function(a_int: int) -> None: >>> pass * a function without argument: >>> @async_function_wrapper - >>> async def an_async_function(): + >>> async def an_async_function() -> None: >>> pass :param func: a sync function to run in thread pool