Skip to content

Commit 3efbdee

Browse files
plutolessclaude
andcommitted
test: fix py3.8 type issues (typing.List, guard Optional stt indexing)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 14a6fd2 commit 3efbdee

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

tests/custom/test_regional_vendors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def test_cn_client_allows_global_only_vendor() -> None:
5959
DeepgramSTT(api_key="dg-key", model="nova-2", language="en-US")
6060
)
6161
assert agent.__class__.__name__ == "CNAgent"
62+
assert agent.stt is not None
6263
assert agent.stt["vendor"] == "deepgram"
6364

6465

@@ -69,6 +70,7 @@ def test_global_client_allows_cn_only_vendor() -> None:
6970
)
7071
agent = Agent(client=client).with_stt(tencent_stt)
7172
assert agent.__class__.__name__ == "GlobalAgent"
73+
assert agent.stt is not None
7274
assert agent.stt["vendor"] == "tencent"
7375

7476

tests/custom/test_sensetime_avatar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pytest
22
from types import SimpleNamespace
3+
from typing import Any, Dict, List
34

45
from agora_agent.agentkit import Agent, AgentSession, validate_avatar_config
56
from agora_agent.agentkit.avatar_types import is_sensetime_avatar
@@ -35,7 +36,7 @@ def _session(agent):
3536
)
3637

3738

38-
def _scene_list() -> list[dict]:
39+
def _scene_list() -> List[Dict[str, Any]]:
3940
return [{"digital_role": {"face_feature_id": "role-1"}}]
4041

4142

0 commit comments

Comments
 (0)