Skip to content

Commit 6eb176a

Browse files
committed
Fix mypy-specific type check error
1 parent a14cfbe commit 6eb176a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/worker/test_workflow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5553,9 +5553,10 @@ def init(self, params: UseLockOrSemaphoreWorkflowParameters):
55535553
@workflow.run
55545554
async def run(
55555555
self,
5556-
params: UseLockOrSemaphoreWorkflowParameters,
5556+
params: Optional[UseLockOrSemaphoreWorkflowParameters],
55575557
) -> LockOrSemaphoreWorkflowConcurrencySummary:
55585558
# TODO: Use workflow init method when it exists.
5559+
assert params
55595560
self.init(params)
55605561
await asyncio.gather(
55615562
*(self.coroutine(f"{i}") for i in range(self.params.n_coroutines))
@@ -5610,6 +5611,7 @@ def __init__(self) -> None:
56105611
@workflow.run
56115612
async def run(
56125613
self,
5614+
_: Optional[UseLockOrSemaphoreWorkflowParameters] = None,
56135615
) -> LockOrSemaphoreWorkflowConcurrencySummary:
56145616
await workflow.wait_condition(lambda: self.workflow_may_exit)
56155617
return LockOrSemaphoreWorkflowConcurrencySummary(

0 commit comments

Comments
 (0)