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 49be532 commit c4aa4c7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions a_sync/a_sync/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ async def my_coroutine(x: int) -> str:
@overload
def __init__(
self, fn: CoroFn[P, T], **modifiers: Unpack[ModifierKwargs]
) -> None:
) -> None: ...
# TODO write specific docs for this overload
@overload
def __init__(
self, fn: SyncFn[P, T], **modifiers: Unpack[ModifierKwargs]
) -> None:
) -> None: ...
# TODO write specific docs for this overload
def __init__(self, fn: AnyFn[P, T], **modifiers: Unpack[ModifierKwargs]) -> None:
"""
Expand All @@ -155,25 +155,25 @@ def __init__(self, fn: AnyFn[P, T], **modifiers: Unpack[ModifierKwargs]) -> None
)

@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) -> MaybeCoro[T]:
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> MaybeCoro[T]: ...
# TODO write specific docs for this overload
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> MaybeCoro[T]:
"""
Expand Down Expand Up @@ -688,11 +688,11 @@ def validate_inputs(self) -> None:

@overload
def __call__(self, func: AnyFn[Concatenate[B, P], T]) -> "ASyncBoundMethod[B, 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]) -> ASyncFunction[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]) -> ASyncFunction[P, T]: # type: ignore [override]
"""
Expand Down Expand Up @@ -754,25 +754,25 @@ async def my_function(x: int) -> str:

@overload
def __call__(self, *args: P.args, sync: Literal[True], **kwargs: P.kwargs) -> T:
# TODO write specific docs for this overload
...# TODO write specific docs for this overload
@overload
def __call__(
self, *args: P.args, sync: Literal[False], **kwargs: P.kwargs
) -> Coroutine[Any, Any, T]:
# TODO write specific docs for this overload
...# TODO write specific docs for this overload
@overload
def __call__(
self, *args: P.args, asynchronous: Literal[False], **kwargs: P.kwargs
) -> T:
# TODO write specific docs for this overload
...# TODO write specific docs for this overload
@overload
def __call__(
self, *args: P.args, asynchronous: Literal[True], **kwargs: P.kwargs
) -> Coroutine[Any, Any, T]:
# TODO write specific docs for this overload
...# TODO write specific docs for this overload
@overload
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T:
# TODO write specific docs for this overload
...# TODO write specific docs for this overload
def __call__(self, *args: P.args, **kwargs: P.kwargs) -> MaybeCoro[T]:
"""Calls the wrapped function, defaulting to synchronous execution.
Expand Down

0 comments on commit c4aa4c7

Please sign in to comment.