refactor: fix variable typo

This commit is contained in:
Matthias
2025-05-03 08:03:16 +02:00
parent 74f601b352
commit 87d954a322
2 changed files with 3 additions and 3 deletions

View File

@@ -15,4 +15,4 @@ class AnnotationType(TypedDict, total=False):
label: str
AnnotationTypePA = TypeAdapter(AnnotationType)
AnnotationTypeTA = TypeAdapter(AnnotationType)

View File

@@ -1813,14 +1813,14 @@ class IStrategy(ABC, HyperStrategyMixin):
end_date=dataframe.iloc[-1]["date"].to_pydatetime(),
)
from freqtrade.ft_types.plot_annotation_type import AnnotationTypePA
from freqtrade.ft_types.plot_annotation_type import AnnotationTypeTA
annotations_new: list[AnnotationType] = []
for annotation in annotations:
if isinstance(annotation, dict):
# Convert to AnnotationType
try:
AnnotationTypePA.validate_python(annotation)
AnnotationTypeTA.validate_python(annotation)
annotations_new.append(annotation)
except ValidationError as e:
logger.error(f"Invalid annotation data: {annotation}. Error: {e}")