mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-13 03:33:55 +00:00
Convert to pydantic - jsonencoders (no longer exists)
This commit is contained in:
parent
47850ce1b0
commit
d78eb834c4
|
@ -482,11 +482,11 @@ class PairHistory(BaseModel):
|
||||||
data_start: str
|
data_start: str
|
||||||
data_stop: str
|
data_stop: str
|
||||||
data_stop_ts: int
|
data_stop_ts: int
|
||||||
|
# TODO[pydantic]: The following keys were removed: `json_encoders`.
|
||||||
class Config:
|
# Check https://docs.pydantic.dev/dev-v2/migration/#changes-to-config for more information.
|
||||||
json_encoders = {
|
model_config = ConfigDict(json_encoders={
|
||||||
datetime: lambda v: v.strftime(DATETIME_PRINT_FORMAT),
|
datetime: lambda v: v.strftime(DATETIME_PRINT_FORMAT),
|
||||||
}
|
})
|
||||||
|
|
||||||
|
|
||||||
class BacktestFreqAIInputs(BaseModel):
|
class BacktestFreqAIInputs(BaseModel):
|
||||||
|
@ -515,7 +515,7 @@ class BacktestResponse(BaseModel):
|
||||||
progress: float
|
progress: float
|
||||||
trade_count: Optional[float] = None
|
trade_count: Optional[float] = None
|
||||||
# TODO: Properly type backtestresult...
|
# TODO: Properly type backtestresult...
|
||||||
backtest_result: SerializeAsAny[Optional[Dict[str, Any]]] = None
|
backtest_result: SerializeAsAny[Optional[Dict[str, Any]]]
|
||||||
|
|
||||||
|
|
||||||
# TODO: This is a copy of BacktestHistoryEntryType
|
# TODO: This is a copy of BacktestHistoryEntryType
|
||||||
|
|
Loading…
Reference in New Issue
Block a user