Skip to content

Commit

Permalink
fix opensubtitles typing
Browse files Browse the repository at this point in the history
  • Loading branch information
getzze committed Oct 22, 2024
1 parent 4939310 commit 25d668d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subliminal/converters/opensubtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ def convert(self, alpha3: str, country: str | None = None, script: str | None =
alpha3b = self.alpha3b_converter.convert(alpha3, country, script) # type: ignore[no-any-return]
if (alpha3b, country, script) in self.to_opensubtitles:
return self.to_opensubtitles[(alpha3b, country, script)]
return alpha3b
return alpha3b # type: ignore[no-any-return]

def reverse(self, code: str) -> LanguageTuple:
"""Reverse a custom code into alpha3, country and script code."""
if code in self.from_opensubtitles:
return self.from_opensubtitles[code]
return self.from_opensubtitles[code] # type: ignore[no-any-return]
for conv in [self.alpha3b_converter, self.alpha2_converter]:
conv = cast(LanguageReverseConverter, conv)
try:
Expand Down

0 comments on commit 25d668d

Please sign in to comment.