mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-06-10 17:39:27 +00:00
fix type annotation for detect_languages
This commit is contained in:
parent
ab62fac1df
commit
16718ebd49
|
@ -13,7 +13,7 @@ def load_languages():
|
|||
|
||||
return __languages
|
||||
|
||||
def detect_languages(text: str, allowed_languages: "list[str] | None" = None):
|
||||
def detect_languages(text: "str | list[str]", allowed_languages: "list[str] | None" = None):
|
||||
# detect batch processing
|
||||
if isinstance(text, list):
|
||||
is_batch = True
|
||||
|
|
Loading…
Reference in a new issue