Skip to content

Commit 82e8418

Browse files
committed
style: fix isort import order in RFC #20 modified files
1 parent 8ccdf25 commit 82e8418

2 files changed

Lines changed: 37 additions & 22 deletions

File tree

packages/parser-core/src/bankstatements_core/extraction/pdf_extractor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,12 @@ def _determine_boundaries_and_extract(
188188
all_words = initial_area.extract_words(use_text_flow=True)
189189

190190
if self.header_check_enabled:
191-
from bankstatements_core.services.header_detection import (
192-
HeaderDetectionService,
193-
)
194191
from bankstatements_core.extraction.extraction_params import (
195192
MIN_HEADER_KEYWORDS,
196193
)
194+
from bankstatements_core.services.header_detection import (
195+
HeaderDetectionService,
196+
)
197197

198198
header_top = (
199199
header_check_top_y
@@ -236,12 +236,12 @@ def _determine_boundaries_and_extract(
236236
words = table_area.extract_words(use_text_flow=True)
237237

238238
if self.header_check_enabled:
239-
from bankstatements_core.services.header_detection import (
240-
HeaderDetectionService,
241-
)
242239
from bankstatements_core.extraction.extraction_params import (
243240
MIN_HEADER_KEYWORDS,
244241
)
242+
from bankstatements_core.services.header_detection import (
243+
HeaderDetectionService,
244+
)
245245

246246
header_top = (
247247
header_check_top_y

packages/parser-core/src/bankstatements_core/pdf_table_extractor.py

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,50 @@
3939
extract_tables_from_pdf,
4040
)
4141

42+
# Direct service imports — replacing the three thin facade modules
4243
# Re-export extraction parameters (backward compatibility)
4344
from bankstatements_core.extraction.extraction_params import ( # noqa: E402, F401
4445
ADMINISTRATIVE_PATTERNS,
4546
CONTENT_DENSITY_THRESHOLD,
4647
ENABLE_PAGE_VALIDATION,
47-
MIN_COLUMN_COVERAGE,
48-
MIN_HEADER_KEYWORDS,
49-
MIN_TABLE_ROWS,
50-
MIN_TRANSACTION_RATIO,
51-
MIN_TRANSACTION_SCORE,
52-
REQUIRE_AMOUNT_COLUMN,
53-
REQUIRE_DATE_COLUMN,
54-
SLIDING_WINDOW_SIZE,
55-
TABLE_BOTTOM_Y,
56-
TABLE_TOP_Y,
5748
)
58-
59-
# Direct service imports — replacing the three thin facade modules
6049
from bankstatements_core.extraction.extraction_params import ( # noqa: E402, F401
50+
MIN_COLUMN_COVERAGE,
51+
)
52+
from bankstatements_core.extraction.extraction_params import (
6153
MIN_COLUMN_COVERAGE as _MIN_COLUMN_COVERAGE,
54+
)
55+
from bankstatements_core.extraction.extraction_params import MIN_HEADER_KEYWORDS
56+
from bankstatements_core.extraction.extraction_params import (
57+
MIN_HEADER_KEYWORDS as _MIN_HEADER_KEYWORDS,
58+
)
59+
from bankstatements_core.extraction.extraction_params import MIN_TABLE_ROWS
60+
from bankstatements_core.extraction.extraction_params import (
6261
MIN_TABLE_ROWS as _MIN_TABLE_ROWS,
62+
)
63+
from bankstatements_core.extraction.extraction_params import MIN_TRANSACTION_RATIO
64+
from bankstatements_core.extraction.extraction_params import (
6365
MIN_TRANSACTION_RATIO as _MIN_TRANSACTION_RATIO,
66+
)
67+
from bankstatements_core.extraction.extraction_params import ( # noqa: E402, F401
68+
MIN_TRANSACTION_SCORE,
69+
)
70+
from bankstatements_core.extraction.extraction_params import REQUIRE_AMOUNT_COLUMN
71+
from bankstatements_core.extraction.extraction_params import (
6472
REQUIRE_AMOUNT_COLUMN as _REQUIRE_AMOUNT_COLUMN,
73+
)
74+
from bankstatements_core.extraction.extraction_params import REQUIRE_DATE_COLUMN
75+
from bankstatements_core.extraction.extraction_params import (
6576
REQUIRE_DATE_COLUMN as _REQUIRE_DATE_COLUMN,
66-
MIN_HEADER_KEYWORDS as _MIN_HEADER_KEYWORDS,
77+
)
78+
from bankstatements_core.extraction.extraction_params import SLIDING_WINDOW_SIZE
79+
from bankstatements_core.extraction.extraction_params import (
6780
SLIDING_WINDOW_SIZE as _SLIDING_WINDOW_SIZE,
6881
)
82+
from bankstatements_core.extraction.extraction_params import ( # noqa: E402, F401
83+
TABLE_BOTTOM_Y,
84+
TABLE_TOP_Y,
85+
)
6986
from bankstatements_core.extraction.row_classifiers import ( # noqa: E402, F401
7087
create_row_classifier_chain,
7188
)
@@ -78,9 +95,7 @@
7895
from bankstatements_core.services.page_validation import ( # noqa: E402, F401
7996
PageValidationService,
8097
)
81-
from bankstatements_core.services.row_merger import ( # noqa: E402, F401
82-
RowMergerService,
83-
)
98+
from bankstatements_core.services.row_merger import RowMergerService # noqa: E402, F401
8499

85100
# Module-level singletons (instantiated once, not per-call)
86101
_PAGE_VALIDATION_SERVICE = PageValidationService(

0 commit comments

Comments
 (0)