Skip to content

Commit 4ba13a4

Browse files
committed
fic: Improve type safety for annotationType
1 parent e6371f3 commit 4ba13a4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

freqtrade/ft_types/plot_annotation_type.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77

88
class _BaseAnnotationType(TypedDict, total=False):
9-
type: Required[Literal["area", "line"]]
109
start: str | datetime
1110
end: str | datetime
1211
y_start: float
@@ -20,12 +19,12 @@ class AreaAnnotationType(_BaseAnnotationType, total=False):
2019
type: Literal["area"]
2120

2221

23-
class LinenAnnotationType(_BaseAnnotationType, total=False):
22+
class LineAnnotationType(_BaseAnnotationType, total=False):
2423
type: Literal["line"]
2524
width: int
2625
line_style: Literal["solid", "dashed", "dotted"]
2726

2827

29-
AnnotationType = AreaAnnotationType | LinenAnnotationType
28+
AnnotationType = AreaAnnotationType | LineAnnotationType
3029

31-
AnnotationTypeTA = TypeAdapter(AnnotationType)
30+
AnnotationTypeTA: TypeAdapter[AnnotationType] = TypeAdapter(AnnotationType)

0 commit comments

Comments
 (0)