From 31151291a2d5c112c89a5af11611f3d67f39af27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=2EJ=2EI=2E=20Larsen?= <39514032+Raphilanthrope@users.noreply.github.com> Date: Fri, 22 Nov 2024 20:47:27 +0100 Subject: [PATCH] Update layout_utils.py by changing an "if" to an "elif" keyword. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See issue raised in https://github.com/DS4SD/docling/issues/362#issue-2668114001 Signed-off-by: Raphaƫl M.J.I. Larsen <39514032+Raphilanthrope@users.noreply.github.com> --- docling/utils/layout_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling/utils/layout_utils.py b/docling/utils/layout_utils.py index ceb18047..edaaf893 100644 --- a/docling/utils/layout_utils.py +++ b/docling/utils/layout_utils.py @@ -388,7 +388,7 @@ def adapt_bbox(raw_cells, cluster, orphan_cell_indices): [raw_cells[cid]["bbox"] for cid in cluster["cell_ids"]] ) logger.debug(" New bounding box:" + str(new_bbox)) - if cluster["type"] == DocItemLabel.PICTURE: + elif cluster["type"] == DocItemLabel.PICTURE: ## We only make the bbox completely comprise included text cells: logger.debug(" Picture") if len(cluster["cell_ids"]) != 0: