Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate some extracted unit test data that changed with 75a2d33 #82

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
2019-01-09 * "Check 23400"
Assets:Banks:Checking -1000 USD

2019-08-30 balance Assets:Banks:Checking 150.65 USD
2019-09-02 balance Assets:Banks:Checking 150.65 USD
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
2023-02-28 * "Monthly Interest Paid" ""
Assets:Banks:CapitalOne 0.01 USD

2023-03-07 balance Assets:Banks:CapitalOne 4321.98 USD
2023-03-09 balance Assets:Banks:CapitalOne 4321.98 USD
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def convert_columns(self, rdr):

# fixup currencies
def remove_non_numeric(x):
return re.sub("[^0-9\.]", "", x) # noqa: W605
return re.sub(r'[^0-9\.]', "", x) # noqa: W605
currencies = ['unit_price']
for i in currencies:
rdr = rdr.convert(i, remove_non_numeric)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def convert_columns(self, rdr):

# fixup currencies
def remove_non_numeric(x):
return re.sub("[^0-9\.]", "", x) # noqa: W605
return re.sub(r'[^0-9\.]', "", x) # noqa: W605
currencies = ['unit_price']
for i in currencies:
rdr = rdr.convert(i, remove_non_numeric)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
2023-03-07 * "Investment Expense" "[V7743] Vanguard Target Retirement 2050 Trust"
Assets:Vanguard:401k:Pretax:V7743 -0.000349 V7743

2023-05-25 balance Assets:Vanguard:401k:V7743 113.718 V7743

2023-05-26 price V7743 117.71 USD

2023-05-27 balance Assets:Vanguard:401k:V7743 113.718 V7743
2 changes: 1 addition & 1 deletion beancount_reds_importers/libreader/csvreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def convert_columns(self, rdr):

# fixup currencies
def remove_non_numeric(x):
return re.sub("[^0-9\.-]", "", str(x).strip()) # noqa: W605
return re.sub(r'[^0-9\.-]', "", str(x).strip()) # noqa: W605
currencies = getattr(self, 'currency_fields', []) + ['unit_price', 'fees', 'total', 'amount', 'balance']
for i in currencies:
if i in rdr.header():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
2019-01-09 * "Check 23400"
Assets:Banks:Checking -1000 USD

2019-09-01 balance Assets:Banks:Checking 150.65 USD
2019-09-02 balance Assets:Banks:Checking 150.65 USD