Skip to content

Commit d3dd139

Browse files
committed
Fix Python translate test typing
1 parent 1765b4f commit d3dd139

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

python/tests/test_translate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import unittest
44
import json
5+
from typing import cast
56

67
from modcdp.translate import (
78
CUSTOM_EVENT_BINDING_NAME,
@@ -46,7 +47,7 @@ def test_routes_wraps_and_unwraps_modcdp_protocol_messages_deterministically(sel
4647
custom_step_params = custom["steps"][0].get("params", {})
4748
self.assertIn("JSON.parse(paramsJson)", str(custom_step_params.get("functionDeclaration")))
4849
self.assertNotIn("xxxxxxxxxx", str(custom_step_params.get("functionDeclaration")))
49-
custom_arguments = custom_step_params.get("arguments", [])
50+
custom_arguments = cast("list[dict[str, object]]", custom_step_params.get("arguments", []))
5051
self.assertEqual(custom_arguments[0].get("value"), "Custom.echo")
5152
self.assertEqual(json.loads(str(custom_arguments[1].get("value"))), {"secret": "x" * 100, "nested": {"ok": True}})
5253
self.assertEqual(custom_arguments[2].get("value"), "session-1")

python/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)