From d54b5859abcdd951782a2aecdb687e4fa4577052 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 29 Jun 2024 05:32:04 -0400 Subject: [PATCH] Post-ruff-format fixups --- temporalio/worker/_activity.py | 4 ++-- tests/worker/test_workflow.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/temporalio/worker/_activity.py b/temporalio/worker/_activity.py index 1e392597..c55ff245 100644 --- a/temporalio/worker/_activity.py +++ b/temporalio/worker/_activity.py @@ -623,8 +623,8 @@ def init(self, outbound: ActivityOutboundInterceptor) -> None: async def execute_activity(self, input: ExecuteActivityInput) -> Any: # Handle synchronous activity is_async = inspect.iscoroutinefunction(input.fn) or inspect.iscoroutinefunction( - input.fn.__call__ - ) # type: ignore + input.fn.__call__ # type: ignore + ) if not is_async: # We execute a top-level function via the executor. It is top-level # because it needs to be picklable. Also, by default Python does not diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 29966f7a..fcd957ae 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -1127,8 +1127,8 @@ async def child_started() -> bool: return await handle.query( CancelChildWorkflow.ready ) and await client.get_workflow_handle_for( - LongSleepWorkflow.run, - workflow_id=f"{handle.id}_child", # type: ignore[arg-type] + LongSleepWorkflow.run, # type: ignore[arg-type] + workflow_id=f"{handle.id}_child", ).query(LongSleepWorkflow.started) except RPCError as err: # Ignore not-found or failed precondition because child may @@ -3056,8 +3056,8 @@ async def test_workflow_typed_handle(client: Client): TypedHandleWorkflow.run, id=id, task_queue=worker.task_queue ) handle_result: TypedHandleResponse = await client.get_workflow_handle_for( - TypedHandleWorkflow.run, - id, # type: ignore[arg-type] + TypedHandleWorkflow.run, # type: ignore[arg-type] + id, ).result() assert isinstance(handle_result, TypedHandleResponse)