chore: autoformat actual code

This commit is contained in:
Matthias
2025-07-04 09:10:30 +02:00
parent d010a050d3
commit 16defdbfdf
4 changed files with 5 additions and 15 deletions

View File

@@ -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

View File

@@ -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"]

View File

@@ -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,

View File

@@ -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: