Skip to content

Commit 472daae

Browse files
committed
style: fix flake8 E501 line-too-long in context.py and sync.py
1 parent 66cc063 commit 472daae

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

investing_algorithm_framework/app/context.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
MarketCredentialService, OrderService, PortfolioConfigurationService, \
77
PortfolioService, PositionService, TradeService, DataProviderService, \
88
TradeStopLossService, TradeTakeProfitService, BrokerBalanceTracker
9-
from investing_algorithm_framework.services.portfolios.portfolio_provider_lookup \
10-
import PortfolioProviderLookup
9+
from investing_algorithm_framework.services.portfolios import (
10+
PortfolioProviderLookup,
11+
)
1112
from investing_algorithm_framework.domain import OrderStatus, OrderType, \
1213
OrderSide, OperationalException, Portfolio, RoundingService, \
1314
BACKTESTING_FLAG, INDEX_DATETIME, Order, \
@@ -1143,7 +1144,9 @@ def _reserved_cash_for_pending_orders(
11431144
for order in created_orders or []:
11441145
try:
11451146
price = float(order.get_price() or 0.0)
1146-
amount = float(order.get_remaining() or order.get_amount() or 0.0)
1147+
amount = float(
1148+
order.get_remaining() or order.get_amount() or 0.0
1149+
)
11471150
except Exception: # noqa: BLE001
11481151
continue
11491152
if OrderSide.BUY.equals(order.get_order_side()):

investing_algorithm_framework/domain/models/portfolio/sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class ScheduledDeposit:
6868
"""
6969

7070
amount: float
71-
time_unit: Optional[object] = None # TimeUnit; typed loosely to avoid cycle
71+
# TimeUnit; typed loosely to avoid cycle
72+
time_unit: Optional[object] = None
7273
interval: Optional[int] = None
7374
on: Optional[datetime] = None
7475
fire_on_anchor: bool = False

0 commit comments

Comments
 (0)