Skip to content

Commit 3523685

Browse files
author
Karl Wooster
committed
feat(data type): 🚑 add GenericObjectData as valid type
1 parent 8c4870d commit 3523685

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/simple_chartjs/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ class ObjectData(DatasetData[DataObject]):
139139
pass
140140

141141

142+
class GenericObjectData(DatasetData[dict[str, Any]]): # pyright: ignore[reportExplicitAny]
143+
pass
144+
145+
142146
class Dataset(General):
143147
label: str | None = None
144148
border_color: Color = Color((0, 0, 0, 0.1))
145149
border_cap_style: str = "butt"
146150
background_color: Color = Color((0, 0, 0, 0.1))
147151
border_dash: list[int] = []
148152
border_dash_offset: float = 0.0
149-
data: PrimitiveData | ArrayData | ObjectData
153+
data: PrimitiveData | ArrayData | ObjectData | GenericObjectData
150154
fill: bool | None = None
151155
tension: Decimal = Decimal("0")
152156

0 commit comments

Comments
 (0)