Skip to content

Commit 3450e12

Browse files
committed
Shorten long lines
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent e941426 commit 3450e12

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/frequenz/sdk/microgrid/client/_client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,12 +621,14 @@ async def set_bounds(
621621
if lower > 0:
622622
raise ValueError(f"Lower bound {upper} must be less than or equal to 0.")
623623

624+
target_metric = (
625+
microgrid_pb.SetBoundsParam.TargetMetric.TARGET_METRIC_POWER_ACTIVE
626+
)
624627
try:
625628
self.api.AddInclusionBounds(
626629
microgrid_pb.SetBoundsParam(
627630
component_id=component_id,
628-
# pylint: disable=no-member,line-too-long
629-
target_metric=microgrid_pb.SetBoundsParam.TargetMetric.TARGET_METRIC_POWER_ACTIVE,
631+
target_metric=target_metric,
630632
bounds=metrics_pb.Bounds(lower=lower, upper=upper),
631633
),
632634
)

src/frequenz/sdk/timeseries/_formula_engine/_formula_generators/_grid_current_formula.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
class GridCurrentFormula(FormulaGenerator[Current]):
1515
"""Create a formula engine from the component graph for calculating grid current."""
1616

17-
def generate( # noqa: DOC502 (ComponentNotFound is raised indirectly by _get_grid_component_successors)
17+
def generate( # noqa: DOC502
18+
# ComponentNotFound is raised indirectly by _get_grid_component_successors
1819
self,
1920
) -> FormulaEngine3Phase[Current]:
2021
"""Generate a formula for calculating grid current from the component graph.

src/frequenz/sdk/timeseries/_formula_engine/_formula_generators/_grid_power_formula.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
class GridPowerFormula(FormulaGenerator[Power]):
1313
"""Creates a formula engine from the component graph for calculating grid power."""
1414

15-
def generate( # noqa: DOC502 (ComponentNotFound is raised indirectly by _get_grid_component_successors)
15+
def generate( # noqa: DOC502
16+
# * ComponentNotFound is raised indirectly by _get_grid_component_successors
1617
self,
1718
) -> FormulaEngine[Power]:
1819
"""Generate a formula for calculating grid power from the component graph.

0 commit comments

Comments
 (0)