Skip to content

Commit

Permalink
Fix TableCell __repr__
Browse files Browse the repository at this point in the history
  • Loading branch information
Belval committed Dec 19, 2023
1 parent 7c67142 commit 59d8db5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions textractor/entities/table_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def __repr__(self):
if self.metadata.get(IS_MERGED_CELL, False):
entities = {
(cell.row_index, cell.col_index): sorted(
cell.words + cell.children, key=lambda x: (x.bbox.x, x.bbox.y)
cell.words, key=lambda x: (x.bbox.x, x.bbox.y)
)
for cell in sorted(
self.siblings, key=lambda x: (x.row_index, x.col_index)
Expand All @@ -358,7 +358,7 @@ def __repr__(self):
entity_repr = "".join(entity_repr)

else:
entities = self.words + self.children
entities = self.words
entity_repr = " ".join([entity.__repr__() for entity in entities])

entity_string = f"<Cell: ({self.row_index},{self.col_index}), Span: ({self.row_span}, {self.col_span}), Column Header: { self.is_column_header}, "
Expand Down

0 comments on commit 59d8db5

Please sign in to comment.