Skip to content

Commit 862b989

Browse files
committed
tidy
1 parent bb63f39 commit 862b989

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

unstructured_inference/inference/elements.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,12 @@ def slice(self, indices) -> TextRegions:
225225
)
226226

227227
def iter_elements(self):
228-
if self.texts is None:
229-
for (x1, y1, x2, y2) in zip(self.element_coords, self.sources):
230-
yield TextRegion.from_coords(x1, y1, x2, y2, None, source)
231-
else:
232-
for (x1, y1, x2, y2), text, source in zip(
233-
self.element_coords,
234-
self.texts,
235-
self.sources,
236-
):
237-
yield TextRegion.from_coords(x1, y1, x2, y2, text, source)
228+
for (x1, y1, x2, y2), text, source in zip(
229+
self.element_coords,
230+
self.texts,
231+
self.sources,
232+
):
233+
yield TextRegion.from_coords(x1, y1, x2, y2, text, source)
238234

239235
def as_list(self):
240236
"""return a list of LayoutElement for backward compatibility"""

0 commit comments

Comments
 (0)