Skip to content

Commit

Permalink
FIX linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzio committed Feb 5, 2022
1 parent c1538cf commit 9f906b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import misc
import transaction as tr
from core import kraken_asset_map
from database import check_database_or_create, set_price_db
from database import set_price_db
from price_data import PriceData

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -863,9 +863,7 @@ def _read_bitpanda(self, file_path: Path) -> None:
change_fiat = misc.force_decimal(amount_fiat)
# Save price in our local database for later.
price = misc.force_decimal(asset_price)
self.price_data.set_price_db(
platform, asset, config.FIAT.upper(), utc_time, price
)
set_price_db(platform, asset, config.FIAT.upper(), utc_time, price)

if change < 0:
log.error(
Expand Down
3 changes: 2 additions & 1 deletion src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def set_price_db(
log.warning(
"Tried to write price to database, "
"but a different price exists already: "
f"{platform=}, {tablename=}, {utc_time=}, {price=} != {price_db=}"
f"{platform=}, {tablename=}, {utc_time=}, "
f"{price=} != {price_db=}"
)
else:
raise e
Expand Down

0 comments on commit 9f906b1

Please sign in to comment.