From e8307d1194cd998d682dced36599e3c314198934 Mon Sep 17 00:00:00 2001 From: Benjamin Dornel Date: Fri, 27 Oct 2023 00:45:34 +0800 Subject: [PATCH] fix: update example bank enum and column name --- monopoly/constants.py | 1 + monopoly/examples/example_bank.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/monopoly/constants.py b/monopoly/constants.py index f86387be..a15ee61c 100644 --- a/monopoly/constants.py +++ b/monopoly/constants.py @@ -13,6 +13,7 @@ class BankNames(Enum): HSBC = "hsbc" OCBC = "ocbc" STANDARD_CHARTERED = "standard_chartered" + EXAMPLE = "monopoly" class StatementFields(str, Enum): diff --git a/monopoly/examples/example_bank.py b/monopoly/examples/example_bank.py index b01eed4f..032f4426 100644 --- a/monopoly/examples/example_bank.py +++ b/monopoly/examples/example_bank.py @@ -1,16 +1,16 @@ from monopoly.banks.base import BankBase from monopoly.config import StatementConfig -from monopoly.constants import AccountType +from monopoly.constants import AccountType, BankNames # fmt: off class MonopolyBank(BankBase): """Dummy class to help with reading the example PDF statement""" statement_config = StatementConfig( - bank_name="monopoly", + bank_name=BankNames.EXAMPLE, account_type=AccountType.CREDIT, transaction_pattern=( - r"(?P\d+/\d+)\s*" + r"(?P\d+/\d+)\s*" r"(?P.*?)\s*" r"(?P[\d.,]+)$" ),