Skip to content

Commit

Permalink
[update] updating the default services_list on Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Mar 3, 2023
1 parent 2de6ff8 commit 1033e1f
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions translatepy/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@

from translatepy import exceptions, models
from translatepy.language import Language
from translatepy.translators import (BaseTranslator, BingTranslate,
DeeplTranslate, GoogleTranslate,
LibreTranslate, MicrosoftTranslate,
MyMemoryTranslate, ReversoTranslate,
TranslateComTranslate, YandexTranslate)
from translatepy.translators import (PONS, QCRI, BaseTranslator, Bing, DeepL,
Google, Libre, Microsoft, MyMemory,
Reverso, TranslateCom, Yandex)
from translatepy.translators.base import BaseTranslator, C
from translatepy.utils import importer, queue, request

Expand All @@ -41,17 +39,8 @@ def __init__(self, session: typing.Optional[request.Session] = None, services_li
Enables fast mode (concurrent processing)
"""
super().__init__(session)
self.services_list = services_list or [
GoogleTranslate,
YandexTranslate,
MicrosoftTranslate,
ReversoTranslate,
BingTranslate,
DeeplTranslate,
LibreTranslate,
TranslateComTranslate,
MyMemoryTranslate
]
self.services_list = services_list or [Google, Yandex, Microsoft, Reverso, Bing,
DeepL, Libre, TranslateCom, MyMemory, PONS, QCRI]

try:
_ = iter(self.services_list)
Expand Down

0 comments on commit 1033e1f

Please sign in to comment.