From 49be532ec76d2bbbf504a863622da3afd81f698f Mon Sep 17 00:00:00 2001 From: BobTheBuidler Date: Wed, 13 Nov 2024 08:55:40 +0000 Subject: [PATCH] fix: syntax err --- a_sync/a_sync/function.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/a_sync/a_sync/function.py b/a_sync/a_sync/function.py index a405938e..0fd3e453 100644 --- a/a_sync/a_sync/function.py +++ b/a_sync/a_sync/function.py @@ -818,25 +818,25 @@ async def my_function(x: int) -> str: """ @overload - def __call__(self, *args: P.args, sync: Literal[True], **kwargs: P.kwargs) -> T: + def __call__(self, *args: P.args, sync: Literal[True], **kwargs: P.kwargs) -> T: ... # TODO write specific docs for this overload @overload def __call__( self, *args: P.args, sync: Literal[False], **kwargs: P.kwargs - ) -> Coroutine[Any, Any, T]: + ) -> Coroutine[Any, Any, T]: ... # TODO write specific docs for this overload @overload def __call__( self, *args: P.args, asynchronous: Literal[False], **kwargs: P.kwargs - ) -> T: + ) -> T: ... # TODO write specific docs for this overload @overload def __call__( self, *args: P.args, asynchronous: Literal[True], **kwargs: P.kwargs - ) -> Coroutine[Any, Any, T]: + ) -> Coroutine[Any, Any, T]: ... # TODO write specific docs for this overload @overload - def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Coroutine[Any, Any, T]: + def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Coroutine[Any, Any, T]: ... # TODO write specific docs for this overload def __call__(self, *args: P.args, **kwargs: P.kwargs) -> MaybeCoro[T]: """Calls the wrapped function, defaulting to asynchronous execution. @@ -862,33 +862,34 @@ def __call__(self, *args: P.args, **kwargs: P.kwargs) -> MaybeCoro[T]: class ASyncDecoratorSyncDefault(ASyncDecorator): @overload def __call__(self, func: AnyFn[Concatenate[B, P], T]) -> "ASyncBoundMethodSyncDefault[P, T]": # type: ignore [override] + ... # TODO write specific docs for this overload @overload def __call__(self, func: AnyBoundMethod[P, T]) -> ASyncFunctionSyncDefault[P, T]: # type: ignore [override] - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload @overload def __call__(self, func: AnyFn[P, T]) -> ASyncFunctionSyncDefault[P, T]: # type: ignore [override] - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload def __call__(self, func: AnyFn[P, T]) -> ASyncFunctionSyncDefault[P, T]: - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload return ASyncFunctionSyncDefault(func, **self.modifiers) class ASyncDecoratorAsyncDefault(ASyncDecorator): @overload def __call__(self, func: AnyFn[Concatenate[B, P], T]) -> "ASyncBoundMethodAsyncDefault[P, T]": # type: ignore [override] - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload @overload def __call__(self, func: AnyBoundMethod[P, T]) -> ASyncFunctionAsyncDefault[P, T]: # type: ignore [override] - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload @overload def __call__(self, func: AnyFn[P, T]) -> ASyncFunctionAsyncDefault[P, T]: # type: ignore [override] - # TODO write specific docs for this overload + ... # TODO write specific docs for this overload def __call__(self, func: AnyFn[P, T]) -> ASyncFunctionAsyncDefault[P, T]: # TODO write specific docs for this overload