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 Aug 19, 2024
1 parent bbb6964 commit 65995d5
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 @@ -5909,9 +5909,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 @@ -5966,6 +5967,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 65995d5

Please sign in to comment.