Skip to content

Commit

Permalink
Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Oct 1, 2024
1 parent 43ad2c8 commit b485802
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5660,10 +5660,10 @@ async def _run_workflow_and_get_warning(self) -> bool:
elif self.handler_waiting == "-wait-all-handlers-finish-":
await update_task
else:
with pytest.raises(RPCError) as update_err:
with pytest.raises(RPCError) as rpc_err:
await update_task
assert update_err.value.status == RPCStatusCode.NOT_FOUND and (
str(update_err.value).lower()
assert rpc_err.value.status == RPCStatusCode.NOT_FOUND and (
str(rpc_err.value).lower()
== "workflow execution already completed"
)

Expand Down Expand Up @@ -6165,11 +6165,11 @@ def __init__(self) -> None:
self.non_terminating_operation_has_started = False

@workflow.run
async def run(self) -> NoReturn:
async def run(self) -> None:
await asyncio.Future()

@workflow.update(unfinished_policy=workflow.HandlerUnfinishedPolicy.ABANDON)
async def non_terminating_update(self) -> NoReturn:
async def non_terminating_update(self) -> None:
self.non_terminating_operation_has_started = True
await asyncio.Future()

Expand Down Expand Up @@ -6198,4 +6198,4 @@ async def test_update_cancellation(client: Client):
# Cancel the workflow and confirm that update caller sees update failed
await wf_handle.cancel()
with pytest.raises(WorkflowUpdateFailedError):
await non_terminating_update
await non_terminating_update # type: ignore

0 comments on commit b485802

Please sign in to comment.