From efb528bd46efd8d9cf37a0cc7e265e3415918e67 Mon Sep 17 00:00:00 2001 From: berkay Date: Tue, 3 Dec 2024 15:53:36 +0300 Subject: [PATCH] bank and account service is updated --- api_services/bank_actions/wag_account_record_parser.py | 3 ++- service_account_records/regex_func.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api_services/bank_actions/wag_account_record_parser.py b/api_services/bank_actions/wag_account_record_parser.py index 2ea2256..e40ef7a 100644 --- a/api_services/bank_actions/wag_account_record_parser.py +++ b/api_services/bank_actions/wag_account_record_parser.py @@ -16,7 +16,7 @@ from pydantic import BaseModel from databases.sql_models.company.company import Companies from databases.sql_models.identity.identity import People -from service_account_records.regex_func import category_finder + class InsertBudgetRecord(BaseModel): @@ -271,6 +271,7 @@ def parse_comment_for_living_space( def parse_comment_for_build_parts( comment: str, max_build_part: int = 200, parse: str = "DAIRE" ): + from regex_func import category_finder results, results_list = category_finder(comment), [] print("results[parse]", results[parse]) for result in results[parse] or []: diff --git a/service_account_records/regex_func.py b/service_account_records/regex_func.py index 9e22ee2..e020e4e 100644 --- a/service_account_records/regex_func.py +++ b/service_account_records/regex_func.py @@ -6,7 +6,7 @@ if '/service_account_records' not in list(sys.path): import re from difflib import get_close_matches -from service_account_records.configs import AccountConfig +from configs import AccountConfig def word_straighten(word, ref_list, threshold=0.8):