Skip to content

Commit

Permalink
.venv/bin/poe format
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jun 29, 2024
1 parent 9f7864c commit e3dd27f
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 543 deletions.
14 changes: 6 additions & 8 deletions temporalio/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,19 @@


@overload
def defn(fn: CallableType) -> CallableType:
...
def defn(fn: CallableType) -> CallableType: ...


@overload
def defn(
*, name: Optional[str] = None, no_thread_cancel_exception: bool = False
) -> Callable[[CallableType], CallableType]:
...
) -> Callable[[CallableType], CallableType]: ...


@overload
def defn(
*, no_thread_cancel_exception: bool = False, dynamic: bool = False
) -> Callable[[CallableType], CallableType]:
...
) -> Callable[[CallableType], CallableType]: ...


def defn(
Expand Down Expand Up @@ -364,7 +361,7 @@ async def wait_for_worker_shutdown() -> None:


def wait_for_worker_shutdown_sync(
timeout: Optional[Union[timedelta, float]] = None
timeout: Optional[Union[timedelta, float]] = None,
) -> None:
"""Synchronously block while waiting for shutdown to be called on the
worker.
Expand Down Expand Up @@ -539,7 +536,8 @@ def _apply_to_callable(
fn=fn,
# iscoroutinefunction does not return true for async __call__
# TODO(cretz): Why can't MyPy handle this?
is_async=inspect.iscoroutinefunction(fn) or inspect.iscoroutinefunction(fn.__call__), # type: ignore
is_async=inspect.iscoroutinefunction(fn)
or inspect.iscoroutinefunction(fn.__call__), # type: ignore
no_thread_cancel_exception=no_thread_cancel_exception,
),
)
Expand Down
Loading

0 comments on commit e3dd27f

Please sign in to comment.