mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-18 23:21:00 +00:00
Fixed all pep8 errors
Removed unused imports, variables
This commit is contained in:
parent
202db95f52
commit
32061eed7b
11 changed files with 32 additions and 20 deletions
|
@ -4,7 +4,6 @@ from argostranslate import translate
|
|||
from polyglot.detect.base import Detector, UnknownLanguage
|
||||
from polyglot.transliteration.base import Transliterator
|
||||
|
||||
|
||||
languages = translate.load_installed_languages()
|
||||
|
||||
|
||||
|
@ -24,7 +23,7 @@ def detect_languages(text):
|
|||
for t in text:
|
||||
try:
|
||||
candidates.extend(Detector(t).languages)
|
||||
except UnknownLanguage as e:
|
||||
except UnknownLanguage:
|
||||
pass
|
||||
|
||||
# total read bytes of the provided text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue