Skip to content

Commit e5fe679

Browse files
kraenhansenclaude
andcommitted
fix: use typing.List/Tuple for Python 3.8 compatibility
Replace PEP 585 lowercase generics (list[tuple[...]]) with typing.List[typing.Tuple[...]] to avoid TypeError on Python 3.8. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2163d22 commit e5fe679

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/elevenlabs/conversational_ai/conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def _get_wss_url(self):
430430
# Ensure base URL ends with '/' for proper joining
431431
if not base_ws_url.endswith("/"):
432432
base_ws_url += "/"
433-
params: list[tuple[str, str]] = [
433+
params: List[Tuple[str, str]] = [
434434
("agent_id", self.agent_id),
435435
("source", "python_sdk"),
436436
("version", __version__),

src/elevenlabs/realtime/scribe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,14 @@ def _build_websocket_url(
372372
base = self.base_url.replace("https://", "wss://").replace("http://", "ws://")
373373

374374
# Build query parameters
375-
params: list[tuple[str, str]] = [
375+
params: typing.List[typing.Tuple[str, str]] = [
376376
("model_id", model_id),
377377
("audio_format", audio_format),
378378
("commit_strategy", commit_strategy),
379379
]
380380

381381
# Add optional parameters
382-
optional: list[tuple[str, typing.Any]] = [
382+
optional: typing.List[typing.Tuple[str, typing.Any]] = [
383383
("vad_silence_threshold_secs", vad_silence_threshold_secs),
384384
("vad_threshold", vad_threshold),
385385
("min_speech_duration_ms", min_speech_duration_ms),

0 commit comments

Comments
 (0)