Skip to content

Commit

Permalink
Update precommit dependencies & reformat according to the latest black
Browse files Browse the repository at this point in the history
  • Loading branch information
OSadovy committed Feb 16, 2024
1 parent 93d59a1 commit 9dc6e86
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^tests/.*\.(csv|beancount)$'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand All @@ -25,19 +25,19 @@ repos:
# args: ['--py37-plus']

- repo: https://github.com/PyCQA/isort
rev: 5.11.5
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: stable
rev: 24.2.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.291
rev: v0.2.1
hooks:
- id: ruff

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""

from setuptools import setup

if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion src/uabean/downloaders/monobank.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Run with --help for usage.
"""


import argparse
import csv
import datetime
Expand Down
8 changes: 5 additions & 3 deletions src/uabean/importers/binance.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ def transaction_from_rows(self, rows, meta):
units = amount_from_row(row)
postings.append(
data.Posting(
self.spot_wallet_account
if units.number < 0
else self.savings_account,
(
self.spot_wallet_account
if units.number < 0
else self.savings_account
),
units,
None,
None,
Expand Down
1 change: 0 additions & 1 deletion src/uabean/importers/kraken.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"txid","refid","time","type","subtype","aclass","asset","amount","fee","balance"
"""


import csv

import beangulp
Expand Down
1 change: 0 additions & 1 deletion src/uabean/importers/oschad_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
provide the username and password, respectively.
"""


import getpass

# import json
Expand Down
6 changes: 3 additions & 3 deletions src/uabean/importers/wise_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def entry_from_transaction(self, meta, account, t):
meta["time"] = dt.time().strftime("%H:%M:%S")
meta["src_id"] = t["referenceNumber"]
if t["exchangeDetails"] is not None:
meta[
"converted"
] = f'{t["exchangeDetails"]["toAmount"]["value"]} {t["exchangeDetails"]["toAmount"]["currency"]} ({t["exchangeDetails"]["rate"]})'
meta["converted"] = (
f'{t["exchangeDetails"]["toAmount"]["value"]} {t["exchangeDetails"]["toAmount"]["currency"]} ({t["exchangeDetails"]["rate"]})'
)
postings = [
Posting(account, amount_from_obj(t["amount"]), None, None, None, None)
]
Expand Down

0 comments on commit 9dc6e86

Please sign in to comment.