Skip to content

Commit

Permalink
Align and format type annotations in TypedDict classes
Browse files Browse the repository at this point in the history
  • Loading branch information
cr2007 committed Jun 28, 2024
1 parent 25d8638 commit b0ae154
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions cambai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class ErrorDetail(TypedDict):
type (str): The type of error.
"""

loc: list[str]
msg: str
loc: list[str]
msg: str
type: str


Expand Down Expand Up @@ -69,8 +69,8 @@ class LanguageOptionsDict(TypedDict):
short_name (str): The short name of the language.
"""

id: int
language: str
id: int
language: str
short_name: str


Expand Down Expand Up @@ -104,7 +104,7 @@ class VoicesListDict(TypedDict):
voice_name (str): The name of the voice.
"""

id: int
id: int
voice_name: str


Expand All @@ -119,8 +119,8 @@ class VoiceProperties(TypedDict):
"""

voice_name: str
gender: int
age: int
gender: int
age: int


# ---------- Task Status ---------- #
Expand Down Expand Up @@ -175,9 +175,9 @@ class TranscriptionResult(TypedDict):
- speaker (str): The identifier for the speaker in the segment.
"""

start: float
end: float
text: str
start: float
end: float
text: str
speaker: str


Expand All @@ -197,8 +197,8 @@ class DubbedRunInfo(TypedDict):
transcribed to text.
"""

video_url: str
audio_url: str
video_url: str
audio_url: str
transcript: list[TranscriptionResult]


Expand Down Expand Up @@ -237,13 +237,15 @@ class ExtendedTranslationData(BasicTranslationData, total=False):
formality: Optional[int]
gender: Optional[int]


class TranslationResult(TypedDict):
"""
Represents the result of a translation operation.
Attributes:
text (str): The translated text.
"""

text: str

# ------------------------------------------------------------------------------------------------ #
Expand Down

0 comments on commit b0ae154

Please sign in to comment.