Skip to content

Commit 20ca1c8

Browse files
Fix types that were not replaced by pyupgrade
Signed-off-by: Daniel Zullo <[email protected]>
1 parent 1a70a67 commit 20ca1c8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/frequenz/sdk/timeseries/_formula_engine/_formula_engine_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def from_power_formula_generator(
124124
def from_3_phase_current_formula_generator(
125125
self,
126126
channel_key: str,
127-
generator: Type[FormulaGenerator[Current]],
127+
generator: type[FormulaGenerator[Current]],
128128
config: FormulaGeneratorConfig = FormulaGeneratorConfig(),
129129
) -> FormulaEngine3Phase[Current]:
130130
"""Get a receiver for a formula from a generator.

src/frequenz/sdk/timeseries/battery_pool/_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(
8989
self._working_batteries: set[int] = working_batteries.intersection(
9090
metric_calculator.batteries
9191
)
92-
self._result_channel: Broadcast[T | None] = Broadcast[Optional[T]](
92+
self._result_channel: Broadcast[T | None] = Broadcast[T | None](
9393
name=SendOnUpdate.name() + "_" + metric_calculator.name(),
9494
resend_latest=True,
9595
)

tests/config/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_contains(self, conf_vars: dict[str, Any]) -> None:
110110
("list_non_strict_bool", list[str], ["false", "0", "true", "1"]),
111111
("item_data", list[Item], [Item(item_id=1, name="My Item")]),
112112
("dict_str_int", dict[str, int], {"a": 1, "b": 2, "c": 3}),
113-
("var_none", Optional[float], None),
113+
("var_none", float | None, None),
114114
],
115115
)
116116
def test_get_as_success(

0 commit comments

Comments
 (0)