Chris
commited on
Commit
·
e6758ae
1
Parent(s):
588393d
removed two unnecessary modules
Browse files- deep_translator/configs.py +0 -11
- deep_translator/detection.py +2 -1
- deep_translator/utils.py +0 -4
deep_translator/configs.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
"""
|
| 2 |
-
configuration object that holds data about the language detection api
|
| 3 |
-
"""
|
| 4 |
-
|
| 5 |
-
config = {
|
| 6 |
-
"url": 'https://ws.detectlanguage.com/0.2/detect',
|
| 7 |
-
"headers": {
|
| 8 |
-
'User-Agent': 'Detect Language API Python Client 1.4.0',
|
| 9 |
-
'Authorization': 'Bearer {}',
|
| 10 |
-
}
|
| 11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deep_translator/detection.py
CHANGED
|
@@ -2,9 +2,10 @@
|
|
| 2 |
language detection API
|
| 3 |
"""
|
| 4 |
import requests
|
| 5 |
-
from .configs import config # TODO: Discussion: Could this be moved here and remove configs.py entirely?
|
| 6 |
from requests.exceptions import HTTPError
|
| 7 |
|
|
|
|
|
|
|
| 8 |
|
| 9 |
def get_request_body(text, api_key, *args, **kwargs):
|
| 10 |
"""
|
|
|
|
| 2 |
language detection API
|
| 3 |
"""
|
| 4 |
import requests
|
|
|
|
| 5 |
from requests.exceptions import HTTPError
|
| 6 |
|
| 7 |
+
# Module global config
|
| 8 |
+
config = {"url": 'https://ws.detectlanguage.com/0.2/detect',"headers": {'User-Agent': 'Detect Language API Python Client 1.4.0','Authorization': 'Bearer {}',}}
|
| 9 |
|
| 10 |
def get_request_body(text, api_key, *args, **kwargs):
|
| 11 |
"""
|
deep_translator/utils.py
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
"""
|
| 2 |
-
utilities
|
| 3 |
-
"""
|
| 4 |
-
# TODO: Discussion: Whats the purpsoe of this module?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|