Skip to content

Commit

Permalink
Fix mypy-specific type check error
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jul 9, 2024
1 parent 2455d96 commit 0549ac8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5553,9 +5553,10 @@ def init(self, params: UseLockOrSemaphoreWorkflowParameters):
@workflow.run
async def run(
self,
params: UseLockOrSemaphoreWorkflowParameters,
params: Optional[UseLockOrSemaphoreWorkflowParameters],
) -> LockOrSemaphoreWorkflowConcurrencySummary:
# TODO: Use workflow init method when it exists.
assert params
self.init(params)
await asyncio.gather(
*(self.coroutine(f"{i}") for i in range(self.params.n_coroutines))
Expand Down Expand Up @@ -5610,6 +5611,7 @@ def __init__(self) -> None:
@workflow.run
async def run(
self,
_: Optional[UseLockOrSemaphoreWorkflowParameters] = None,
) -> LockOrSemaphoreWorkflowConcurrencySummary:
await workflow.wait_condition(lambda: self.workflow_may_exit)
return LockOrSemaphoreWorkflowConcurrencySummary(
Expand Down

0 comments on commit 0549ac8

Please sign in to comment.