Skip to content

Commit d42e22e

Browse files
committed
fix linter and integration tests
Signed-off-by: Tim Li <[email protected]>
1 parent 0599b3c commit d42e22e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cadence/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,13 @@ async def signal_with_start_workflow(
261261
options = _validate_and_apply_defaults(StartWorkflowOptions(**options_kwargs))
262262

263263
# Build the start workflow request
264-
start_request = await self._build_start_workflow_request(
265-
workflow, args, options
266-
)
264+
start_request = self._build_start_workflow_request(workflow, args, options)
267265

268266
# Encode signal input
269267
signal_payload = None
270268
if signal_input is not None:
271269
try:
272-
signal_payload = await self.data_converter.to_data(signal_input)
270+
signal_payload = self.data_converter.to_data([signal_input])
273271
except Exception as e:
274272
raise ValueError(f"Failed to encode signal input: {e}")
275273

cadence/workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ async def execute_activity(
4444
activity, result_type, *args, **kwargs
4545
)
4646

47+
4748
T = TypeVar("T", bound=Callable[..., Any])
4849

4950

tests/cadence/_internal/workflow/test_workflow_engine_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
import pytest
7-
from unittest.mock import Mock, AsyncMock, patch
7+
from unittest.mock import Mock, patch
88
from cadence.api.v1.service_worker_pb2 import PollForDecisionTaskResponse
99
from cadence.api.v1.common_pb2 import Payload, WorkflowExecution, WorkflowType
1010
from cadence.api.v1.history_pb2 import (
@@ -244,7 +244,7 @@ async def test_extract_workflow_input_deserialization_error(
244244
decision_task = self.create_mock_decision_task()
245245

246246
# Mock data converter to raise an exception
247-
mock_client.data_converter.from_data = AsyncMock(
247+
mock_client.data_converter.from_data = Mock(
248248
side_effect=Exception("Deserialization error")
249249
)
250250

0 commit comments

Comments
 (0)