Skip to content

Commit 69acb08

Browse files
authored
refactor: break up logic from one line to 2 (#247)
Separate elements out into separate variable to allow for conditional logic based on the instance type of the doc (or other properties).
1 parent 87fd0d0 commit 69acb08

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## 0.4.12-dev0
1+
## 0.4.12-dev1
22

3-
* Adds console_entrypoint for unstructured-ingest
3+
* Adds console_entrypoint for unstructured-ingest and more structure/docs related to ingest.
44

55
## 0.4.11
66

unstructured/ingest/doc_processor/generalized.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def process_document(doc):
2828
# accessing the .filename property could lazily call .get_file(), but
2929
# keeping them as two distinct calls for end-user transparency for now
3030
print(f"Processing {doc.filename}")
31-
isd_elems = convert_to_isd(partition(filename=doc.filename))
31+
32+
elements = partition(filename=doc.filename)
33+
34+
isd_elems = convert_to_isd(elements)
3235

3336
isd_elems_no_filename = []
3437
for elem in isd_elems:

0 commit comments

Comments
 (0)