Run pre-commit
This commit is contained in:
parent
766ca78ef5
commit
6c07799e20
16 changed files with 27 additions and 18 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -225,4 +225,4 @@ dmypy.json
|
|||
|
||||
# End of https://www.gitignore.io/api/osx,pycharm,python
|
||||
|
||||
.idea
|
||||
.idea
|
||||
|
|
|
@ -41,4 +41,4 @@ The file passed in parameter will be deleted unless specified (`--keep` option o
|
|||
|
||||
## Versions
|
||||
|
||||
This project follows [Semantic Versioning](https://semver.org/).
|
||||
This project follows [Semantic Versioning](https://semver.org/).
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -118,4 +118,4 @@
|
|||
"memo": "VIREMENT DE PERSON 6",
|
||||
"import_id": "YNAB:8600:2020-02-17:1"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -154,4 +154,4 @@
|
|||
"cleared": "cleared"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,4 +94,4 @@ NEWFILEUID:NONE
|
|||
</STMTRS>
|
||||
</STMTTRNRS>
|
||||
</BANKMSGSRSV1>
|
||||
</OFX>
|
||||
</OFX>
|
||||
|
|
|
@ -41,4 +41,4 @@
|
|||
"memo": "_",
|
||||
"import_id": "YNAB:14490:2020-02-24:1"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -55,4 +55,4 @@
|
|||
"cleared": "cleared"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,4 +20,4 @@
|
|||
"memo": "CHQ 1234567",
|
||||
"import_id": "YNAB:-42000:2020-07-21:1"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -28,4 +28,4 @@
|
|||
"cleared": "cleared"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -91,4 +91,4 @@
|
|||
"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