File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
src/frequenz/client/microgrid Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 11# Frequenz Microgrid API Client Release Notes
22
3- ## Summary
4-
5- <!-- Here goes a general summary of what this release is about -->
6-
73## Upgrading
84
95- Now component and microgrid IDs are wrapped in new classes: ` ComponentId ` and ` MicrogridId ` respectively.
1612 - Ensuring proper hash behavior in collections.
1713
1814 To migrate you just need to wrap your ` int ` IDs with the appropriate class: ` 0 ` -> ` ComponentId(0) ` / ` MicrogridId(0) ` .
19-
20- ## New Features
21-
22- <!-- Here goes the main new features and examples or instructions on how to use them -->
23-
24- ## Bug Fixes
25-
26- <!-- Here goes notable bug fixes that are worth a special mention or explanation -->
Original file line number Diff line number Diff line change 44"""Strongly typed IDs for microgrids and components."""
55
66
7+ from typing import final
8+
9+
10+ @final
711class MicrogridId :
812 """A unique identifier for a microgrid."""
913
@@ -53,6 +57,7 @@ def __str__(self) -> str:
5357 return f"MID{ self ._id } "
5458
5559
60+ @final
5661class ComponentId :
5762 """A unique identifier for a microgrid component."""
5863
You can’t perform that action at this time.
0 commit comments