@@ -49,9 +49,7 @@ class UnstructuredHelper:
49
49
PROCESS = "process"
50
50
51
51
@staticmethod
52
- def test_server_connection (
53
- unstructured_adapter_config : dict [str , Any ]
54
- ) -> bool :
52
+ def test_server_connection (unstructured_adapter_config : dict [str , Any ]) -> bool :
55
53
UnstructuredHelper .make_request (
56
54
unstructured_adapter_config , UnstructuredHelper .TEST_CONNECTION
57
55
)
@@ -66,9 +64,7 @@ def process_document(
66
64
try :
67
65
response : Response
68
66
with open (input_file_path , "rb" ) as input_f :
69
- mime_type = AdapterUtils .get_file_mime_type (
70
- input_file = input_file_path
71
- )
67
+ mime_type = AdapterUtils .get_file_mime_type (input_file = input_file_path )
72
68
files = {"file" : (input_file_path , input_f , mime_type )}
73
69
response = UnstructuredHelper .make_request (
74
70
unstructured_adapter_config = unstructured_adapter_config ,
@@ -95,9 +91,7 @@ def make_request(
95
91
request_type : str ,
96
92
** kwargs : dict [Any , Any ],
97
93
) -> Response :
98
- unstructured_url = unstructured_adapter_config .get (
99
- UnstructuredHelper .URL
100
- )
94
+ unstructured_url = unstructured_adapter_config .get (UnstructuredHelper .URL )
101
95
102
96
x2text_service_url = unstructured_adapter_config .get (
103
97
X2TextConstants .X2TEXT_HOST
0 commit comments