Skip to content

Commit 716b460

Browse files
fix: resolve duplicate TypedDict name collision in Dashboards_Type
Renamed duplicate 'blueprint_devices' TypedDict definitions to prevent type shadowing. The first definition is now 'BlueprintDeviceConfig' (used by DashboardInfo for dashboard configuration) and the second is 'BlueprintDeviceOrigin' (used by GetDataModel for widget data queries). Updated all references in code and documentation to maintain consistency.
1 parent ad2507f commit 716b460

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

docs/source/Resources/Dashboards/Dashboard_Type.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ shared
134134
| Whether re-sharing is allowed
135135
136136

137-
.. _blueprint_devices_conditions:
137+
.. _BlueprintDeviceConfig:
138138

139-
blueprint_devices
140-
-----------------
139+
BlueprintDeviceConfig
140+
---------------------
141141

142142
Blueprint device configuration for dynamic dashboards.
143143

@@ -207,7 +207,7 @@ DashboardInfo
207207
| **blueprint_selector_behavior**: "open" or "closed" or "always_open" or "always_closed"
208208
| Blueprint selector behavior mode
209209
210-
| **blueprint_devices**: :ref:`blueprint_devices_conditions`
210+
| **blueprint_devices**: :ref:`BlueprintDeviceConfig`
211211
| Blueprint device configuration
212212
213213
| **theme**: any
@@ -426,12 +426,12 @@ PostDataModel
426426
| Variable name
427427
428428

429-
.. _blueprint_devices_origin:
429+
.. _BlueprintDeviceOrigin:
430430

431-
blueprint_devices (origin-based)
432-
--------------------------------
431+
BlueprintDeviceOrigin
432+
---------------------
433433

434-
Blueprint device configuration with origin reference.
434+
Blueprint device configuration with origin reference for widget data queries.
435435

436436
**Attributes:**
437437

@@ -476,7 +476,7 @@ GetDataModel
476476
| **overwrite**: Optional[:ref:`widgetOverwrite`]
477477
| Overwrite options
478478
479-
| **blueprint_devices**: Optional[list[:ref:`blueprint_devices_origin`]]
479+
| **blueprint_devices**: Optional[list[:ref:`BlueprintDeviceOrigin`]]
480480
| Blueprint devices list
481481
482482
| **page**: Optional[int or float]

src/tagoio_sdk/modules/Resources/Dashboards_Type.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class shared(TypedDict):
5353
allow_share: bool
5454

5555

56-
class blueprint_devices(TypedDict):
56+
class BlueprintDeviceConfig(TypedDict):
5757
conditions: list[conditions]
5858
name: str
5959
id: str
@@ -75,7 +75,7 @@ class DashboardInfo(TypedDict):
7575
type: str
7676
blueprint_device_behavior: Literal["more_than_one", "always"]
7777
blueprint_selector_behavior: Literal["open", "closed", "always_open", "always_closed"]
78-
blueprint_devices: blueprint_devices
78+
blueprint_devices: BlueprintDeviceConfig
7979
theme: any
8080
setup: any
8181
shared: shared
@@ -157,7 +157,7 @@ class PostDataModel(TypedDict):
157157
variable: str
158158

159159

160-
class blueprint_devices(TypedDict):
160+
class BlueprintDeviceOrigin(TypedDict):
161161
origin: GenericID
162162
id: GenericID
163163
bucket: Optional[GenericID]
@@ -171,7 +171,7 @@ class widgetOverwrite(TypedDict):
171171

172172
class GetDataModel(TypedDict):
173173
overwrite: Optional[widgetOverwrite]
174-
blueprint_devices: Optional[list[blueprint_devices]]
174+
blueprint_devices: Optional[list[BlueprintDeviceOrigin]]
175175
page: Optional[Union[int, float]]
176176
amount: Optional[Union[int, float]]
177177

0 commit comments

Comments
 (0)