diff --git a/pagexml/helper/pagexml_helper.py b/pagexml/helper/pagexml_helper.py index c3d52d8..d66cf17 100644 --- a/pagexml/helper/pagexml_helper.py +++ b/pagexml/helper/pagexml_helper.py @@ -71,8 +71,7 @@ def regions_overlap(region1: pdm.PageXMLDoc, region2: pdm.PageXMLDoc, if v_overlap / height2 > threshold: if h_overlap / width2 > threshold: return True - else: - return False + return False def sort_regions_in_reading_order(doc: pdm.PageXMLDoc) -> List[pdm.PageXMLTextRegion]: diff --git a/tests/helper-pagexml_helper_test.py b/tests/helper-pagexml_helper_test.py index 250f00a..b078007 100644 --- a/tests/helper-pagexml_helper_test.py +++ b/tests/helper-pagexml_helper_test.py @@ -1,9 +1,9 @@ import unittest from typing import List, Tuple -from pagexml.parser import parse_pagexml_file import pagexml.helper.pagexml_helper as helper import pagexml.model.physical_document_model as pdm +from pagexml.parser import parse_pagexml_file def make_region(points: List[Tuple[int, int]], doc_id: str = 'doc') -> pdm.PageXMLTextRegion: