Skip to content

Commit

Permalink
fix: syntax err
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Nov 13, 2024
1 parent 9cb0918 commit 49be532
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions a_sync/a_sync/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 49be532

Please sign in to comment.