Skip to content

Commit 5a31174

Browse files
Minor fix on index_file and get_file_mime_type()
1 parent 105effd commit 5a31174

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/unstract/sdk/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ def index_file(
112112
self.tool.stream_log("Extracting text from input file")
113113
full_text = []
114114
x2text = X2Text(tool=self.tool)
115-
x2text_adapter: X2TextAdapter = x2text.get_x2text(
115+
x2text_adapter_inst: X2TextAdapter = x2text.get_x2text(
116116
adapter_instance_id=x2text_adapter
117117
)
118-
extracted_text = x2text_adapter.process(input_file_path=file_path)
118+
extracted_text = x2text_adapter_inst.process(input_file_path=file_path)
119119
full_text.append(
120120
{
121121
"section": "full",

src/unstract/sdk/utils/tool_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def json_to_str(json_to_dump: dict[str, Any]) -> str:
8080
return compact_json
8181

8282
@staticmethod
83-
def get_file_mime_type(self, input_file: Path) -> str:
83+
def get_file_mime_type(input_file: Path) -> str:
8484
"""Gets the file MIME type for an input file. Uses libmagic to perform
8585
the same.
8686

0 commit comments

Comments
 (0)