diff --git a/beancount_reds_importers/importers/schwab/schwab_csv_balances.py b/beancount_reds_importers/importers/schwab/schwab_csv_balances.py index 561edc0..5f52426 100644 --- a/beancount_reds_importers/importers/schwab/schwab_csv_balances.py +++ b/beancount_reds_importers/importers/schwab/schwab_csv_balances.py @@ -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) diff --git a/beancount_reds_importers/importers/schwab/schwab_csv_positions.py b/beancount_reds_importers/importers/schwab/schwab_csv_positions.py index 1f70044..8f3bd1a 100644 --- a/beancount_reds_importers/importers/schwab/schwab_csv_positions.py +++ b/beancount_reds_importers/importers/schwab/schwab_csv_positions.py @@ -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) diff --git a/beancount_reds_importers/libreader/csvreader.py b/beancount_reds_importers/libreader/csvreader.py index c03974a..457f832 100644 --- a/beancount_reds_importers/libreader/csvreader.py +++ b/beancount_reds_importers/libreader/csvreader.py @@ -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():