chore: fix typing errors

This commit is contained in:
Matthias
2025-03-23 19:09:11 +01:00
parent 7b44dd17ae
commit 3ffc69ad02
2 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
from copy import deepcopy
from typing import Any
from typing import Any, cast
from typing_extensions import TypedDict
@@ -16,12 +16,15 @@ class BacktestResultType(TypedDict):
def get_BacktestResultType_default() -> BacktestResultType:
return deepcopy(
{
"metadata": {},
"strategy": {},
"strategy_comparison": [],
}
return cast(
BacktestResultType,
deepcopy(
{
"metadata": {},
"strategy": {},
"strategy_comparison": [],
}
),
)

View File

@@ -132,6 +132,7 @@ class IStrategy(ABC, HyperStrategyMixin):
stake_currency: str
# container variable for strategy source code
__source__: str = ""
__file__: str = ""
# Definition of plot_config. See plotting documentation for more details.
plot_config: dict = {}