Skip to content

Commit 5795269

Browse files
committed
Lint fixes
1 parent d6ca246 commit 5795269

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tests/worker/test_workflow.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5370,15 +5370,17 @@ async def run(
53705370
"Deliberately failing workflow with an unfinished handler"
53715371
)
53725372
await workflow.wait_condition(lambda: False)
5373+
raise AssertionError("unreachable")
53735374

53745375
@workflow.update
5375-
async def my_update(self) -> str:
5376+
async def my_update(self) -> NoReturn:
53765377
await workflow.wait_condition(lambda: False)
5377-
return "update-result"
5378+
raise AssertionError("unreachable")
53785379

53795380
@workflow.signal
5380-
async def my_signal(self):
5381+
async def my_signal(self) -> NoReturn:
53815382
await workflow.wait_condition(lambda: False)
5383+
raise AssertionError("unreachable")
53825384

53835385

53845386
async def test_unfinished_update_handler_with_workflow_cancellation(client: Client):
@@ -5465,13 +5467,13 @@ async def _run_workflow_and_get_warning(self) -> bool:
54655467
with pytest.WarningsRecorder() as warnings:
54665468
if self.handler_type == "update":
54675469
assert update_task
5468-
with pytest.raises(RPCError) as err:
5470+
with pytest.raises(RPCError) as update_err:
54695471
await update_task
5470-
assert (
5471-
err.value.status == RPCStatusCode.NOT_FOUND
5472-
and "workflow execution already completed"
5473-
in str(err.value).lower()
5474-
)
5472+
assert (
5473+
update_err.value.status == RPCStatusCode.NOT_FOUND
5474+
and "workflow execution already completed"
5475+
in str(update_err.value).lower()
5476+
)
54755477

54765478
with pytest.raises(WorkflowFailureError) as err:
54775479
await handle.result()

0 commit comments

Comments
 (0)