Skip to content

Commit 5f7aee9

Browse files
committed
Move documentation from class to Attributes
We use mkdocstrings to document, and the documentation is generated better when it is added to the attributes instead of the class. This also fixes an inconsistency between the docs and the declared attributes that makes the linter complain. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent ed5356a commit 5f7aee9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/frequenz/client/assets/types.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,26 @@ class Microgrid:
8585
A microgrid is a localized group of electricity sources and loads that normally
8686
operates connected to and synchronous with the traditional wide area electrical
8787
grid (macrogrid), but is able to disconnect from the grid and operate autonomously.
88-
89-
Attributes:
90-
id: Unique identifier for the microgrid.
91-
enterprise_id: ID of the enterprise that owns this microgrid.
92-
name: Human-readable name for the microgrid.
93-
delivery_area_code: Code identifying the delivery area.
94-
delivery_area_code_type: Type of delivery area code.
95-
latitude: Geographic latitude coordinate.
96-
longitude: Geographic longitude coordinate.
97-
country_code: ISO country code where the microgrid is located.
98-
status: Current operational status of the microgrid.
99-
create_time: Timestamp when the microgrid was created.
10088
"""
10189

10290
id: MicrogridId
91+
"""Unique identifier for the microgrid."""
92+
10393
enterprise_id: EnterpriseId
94+
"""ID of the enterprise that owns this microgrid."""
95+
10496
name: str
97+
"""Human-readable name for the microgrid."""
98+
10599
delivery_area: DeliveryArea | None
100+
"""Delivery area served by the microgrid, if applicable."""
101+
106102
location: Location | None
103+
"""Geographical location of the microgrid, if applicable."""
104+
107105
status: int
106+
"""Current operational status of the microgrid, represented as an integer."""
107+
108108
create_time: datetime
109109

110110
@staticmethod

0 commit comments

Comments
 (0)