forked from gaugendre/ofx-processor
Run pre-commit
This commit is contained in:
parent
766ca78ef5
commit
6c07799e20
16 changed files with 27 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
import click
|
||||
|
||||
from ofx_processor.utils import ynab
|
||||
from ofx_processor.utils.utils import discover_processors, OrderedGroup
|
||||
from ofx_processor.utils.utils import OrderedGroup, discover_processors
|
||||
|
||||
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import re
|
||||
|
||||
from ofx_processor.utils.base_ofx import OfxBaseProcessor, OfxBaseLine
|
||||
from ofx_processor.utils.base_ofx import OfxBaseLine, OfxBaseProcessor
|
||||
|
||||
|
||||
class CeLine(OfxBaseLine):
|
||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
|||
import click
|
||||
import dateparser
|
||||
|
||||
from ofx_processor.utils.base_processor import BaseProcessor, BaseLine
|
||||
from ofx_processor.utils.base_processor import BaseLine, BaseProcessor
|
||||
|
||||
|
||||
def _amount_str_to_float(amount: str):
|
||||
|
|
|
@ -44,6 +44,12 @@ pre-commit = "^2.15.0"
|
|||
[tool.poetry.scripts]
|
||||
ynab = 'ofx_processor.main:cli'
|
||||
|
||||
[tool.black]
|
||||
target-version = ['py38']
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
"date": "2020-01-05",
|
||||
"amount": -123680,
|
||||
"payee_name": "Company 1",
|
||||
"memo": "Shopping - FX-rate €1 = US$1,1158",
|
||||
"memo": "Shopping - FX-rate \u20ac1\u2008=\u2008US$1,1158",
|
||||
"import_id": "YNAB:-123680:2020-01-05:1",
|
||||
"account_id": "<YOUR REVOLUT ACCOUNT ID>",
|
||||
"cleared": "cleared"
|
||||
|
|
|
@ -7,8 +7,7 @@ from unittest.mock import call
|
|||
|
||||
from click.testing import CliRunner
|
||||
|
||||
from ofx_processor.utils import utils
|
||||
from ofx_processor.utils import ynab
|
||||
from ofx_processor.utils import utils, ynab
|
||||
from ofx_processor.utils.ynab import config
|
||||
|
||||
|
||||
|
@ -77,7 +76,11 @@ class ConfigTestCase(unittest.TestCase):
|
|||
self.cli, ["revolut", "tests/samples/revolut.csv", "--keep"]
|
||||
)
|
||||
expected_filename = ynab.get_config_file_name()
|
||||
self.assertIn("Error while parsing config file", result.output, f"config_file: {name}")
|
||||
self.assertIn(
|
||||
"Error while parsing config file",
|
||||
result.output,
|
||||
f"config_file: {name}",
|
||||
)
|
||||
edit.assert_called_with(filename=expected_filename)
|
||||
|
||||
@mock.patch("ofx_processor.utils.ynab.DEFAULT_CONFIG_FILENAME", "file.ini")
|
||||
|
|
|
@ -3,9 +3,9 @@ import json
|
|||
import unittest
|
||||
|
||||
from ofx_processor.processors.revolut import (
|
||||
_amount_str_to_float,
|
||||
RevolutLine,
|
||||
RevolutProcessor,
|
||||
_amount_str_to_float,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue