Skip to content

Commit

Permalink
Import statements were simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
titov-vv committed May 23, 2024
1 parent 8c576ef commit b83564e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions jal/db/closed_trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from jal.db.db import JalDB
from jal.db.helpers import format_decimal
import jal.db.account
import jal.db.asset
import jal.db.operations
from jal.db.asset import JalAsset

Expand Down Expand Up @@ -58,7 +57,7 @@ def __init__(self, id: int = 0) -> None:
"FROM trades_closed WHERE id=:id", [(":id", self._id)], named=True)
if self._data:
self._account = jal.db.account.JalAccount(self._data['account_id'])
self._asset = jal.db.asset.JalAsset(self._data['asset_id'])
self._asset = JalAsset(self._data['asset_id'])
self._open_op = jal.db.operations.LedgerTransaction.get_operation(self._data['open_otype'], self._data['open_oid'], jal.db.operations.Transfer.Incoming)
self._close_op = jal.db.operations.LedgerTransaction.get_operation(self._data['close_otype'], self._data['close_oid'], jal.db.operations.Transfer.Outgoing)
self._open_price = Decimal(self._data['open_price'])
Expand Down Expand Up @@ -110,7 +109,7 @@ def dump(self) -> list:
def id(self) -> int:
return self._id

def asset(self) -> jal.db.asset.JalAsset:
def asset(self) -> JalAsset:
return self._asset

def symbol(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion jal/widgets/price_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from PySide6.QtCharts import QChartView, QLineSeries, QScatterSeries, QDateTimeAxis, QValueAxis, QXYSeries
from jal.db.account import JalAccount
from jal.db.asset import JalAsset
from jal.db.operations import LedgerTransaction, Transfer, CorporateAction
from jal.db.operations import LedgerTransaction
from jal.constants import CustomColor
from jal.widgets.mdi import MdiWidget
from jal.widgets.helpers import ts2d
Expand Down

0 comments on commit b83564e

Please sign in to comment.