=
commited on
Commit
·
28c2eed
1
Parent(s):
23ed530
added tests in main
Browse files
deep_translator/__init__.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
"""Top-level package for deep_translator."""
|
2 |
-
|
3 |
-
from google_trans import GoogleTranslator
|
4 |
-
from pons import PonsTranslator
|
5 |
-
# import exceptions
|
6 |
|
7 |
__author__ = """Nidhal Baccouri"""
|
8 |
__email__ = '[email protected]'
|
|
|
1 |
"""Top-level package for deep_translator."""
|
2 |
+
|
3 |
+
from .google_trans import GoogleTranslator
|
4 |
+
from .pons import PonsTranslator
|
|
|
5 |
|
6 |
__author__ = """Nidhal Baccouri"""
|
7 |
__email__ = '[email protected]'
|
deep_translator/deep_translator.py
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
"""Main module."""
|
|
|
|
deep_translator/google_trans.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
from __future__ import absolute_import
|
2 |
from abc import ABC
|
3 |
-
|
4 |
-
from
|
5 |
-
from
|
|
|
6 |
from bs4 import BeautifulSoup
|
7 |
import requests
|
8 |
|
|
|
|
|
1 |
from abc import ABC
|
2 |
+
|
3 |
+
from deep_translator.constants import BASE_URLS, GOOGLE_LANGUAGES_TO_CODES
|
4 |
+
from deep_translator.exceptions import LanguageNotSupportedException, ElementNotFoundInGetRequest, NotValidPayload, NotValidLength
|
5 |
+
from deep_translator.parent import BaseTranslator
|
6 |
from bs4 import BeautifulSoup
|
7 |
import requests
|
8 |
|
deep_translator/parent.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
"""Main module."""
|
2 |
-
|
3 |
-
from exceptions import NotValidPayload
|
4 |
from abc import ABC, abstractmethod
|
5 |
|
6 |
|
|
|
1 |
"""Main module."""
|
2 |
+
|
3 |
+
from deep_translator.exceptions import NotValidPayload
|
4 |
from abc import ABC, abstractmethod
|
5 |
|
6 |
|
deep_translator/pons.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
|
2 |
from bs4 import BeautifulSoup
|
3 |
import requests
|
4 |
-
from constants import BASE_URLS, PONS_LANGUAGES_TO_CODES, PONS_CODES_TO_LANGUAGES
|
5 |
-
from exceptions import LanguageNotSupportedException, ElementNotFoundInGetRequest
|
6 |
-
from parent import BaseTranslator
|
7 |
from requests.utils import quote
|
8 |
|
9 |
|
|
|
1 |
+
|
2 |
from bs4 import BeautifulSoup
|
3 |
import requests
|
4 |
+
from deep_translator.constants import BASE_URLS, PONS_LANGUAGES_TO_CODES, PONS_CODES_TO_LANGUAGES
|
5 |
+
from deep_translator.exceptions import LanguageNotSupportedException, ElementNotFoundInGetRequest
|
6 |
+
from deep_translator.parent import BaseTranslator
|
7 |
from requests.utils import quote
|
8 |
|
9 |
|
{tests → deep_translator/tests}/__init__.py
RENAMED
File without changes
|
{tests → deep_translator/tests}/test_deep_translator.py
RENAMED
File without changes
|