mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 05:50:36 +00:00
chore: autoformat actual code
This commit is contained in:
@@ -150,9 +150,7 @@ class TimeRange:
|
||||
starts = rvals[index]
|
||||
if stype[0] == "date" and len(starts) == 8:
|
||||
start = int(
|
||||
datetime.strptime(starts, "%Y%m%d")
|
||||
.replace(tzinfo=UTC)
|
||||
.timestamp()
|
||||
datetime.strptime(starts, "%Y%m%d").replace(tzinfo=UTC).timestamp()
|
||||
)
|
||||
elif len(starts) == 13:
|
||||
start = int(starts) // 1000
|
||||
@@ -163,9 +161,7 @@ class TimeRange:
|
||||
stops = rvals[index]
|
||||
if stype[1] == "date" and len(stops) == 8:
|
||||
stop = int(
|
||||
datetime.strptime(stops, "%Y%m%d")
|
||||
.replace(tzinfo=UTC)
|
||||
.timestamp()
|
||||
datetime.strptime(stops, "%Y%m%d").replace(tzinfo=UTC).timestamp()
|
||||
)
|
||||
elif len(stops) == 13:
|
||||
stop = int(stops) // 1000
|
||||
|
||||
@@ -1583,9 +1583,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
if not_closed:
|
||||
if fully_cancelled or (
|
||||
open_order
|
||||
and self.strategy.ft_check_timed_out(
|
||||
trade, open_order, datetime.now(UTC)
|
||||
)
|
||||
and self.strategy.ft_check_timed_out(trade, open_order, datetime.now(UTC))
|
||||
):
|
||||
self.handle_cancel_order(
|
||||
order, open_order, trade, constants.CANCEL_REASON["TIMEOUT"]
|
||||
|
||||
@@ -71,9 +71,7 @@ class PairLock(ModelBase):
|
||||
"lock_time": self.lock_time.strftime(DATETIME_PRINT_FORMAT),
|
||||
"lock_timestamp": int(self.lock_time.replace(tzinfo=UTC).timestamp() * 1000),
|
||||
"lock_end_time": self.lock_end_time.strftime(DATETIME_PRINT_FORMAT),
|
||||
"lock_end_timestamp": int(
|
||||
self.lock_end_time.replace(tzinfo=UTC).timestamp() * 1000
|
||||
),
|
||||
"lock_end_timestamp": int(self.lock_end_time.replace(tzinfo=UTC).timestamp() * 1000),
|
||||
"reason": self.reason,
|
||||
"side": self.side,
|
||||
"active": self.active,
|
||||
|
||||
@@ -125,9 +125,7 @@ class Order(ModelBase):
|
||||
@property
|
||||
def order_filled_utc(self) -> datetime | None:
|
||||
"""last order-date with UTC timezoneinfo"""
|
||||
return (
|
||||
self.order_filled_date.replace(tzinfo=UTC) if self.order_filled_date else None
|
||||
)
|
||||
return self.order_filled_date.replace(tzinfo=UTC) if self.order_filled_date else None
|
||||
|
||||
@property
|
||||
def safe_amount(self) -> float:
|
||||
|
||||
Reference in New Issue
Block a user