Skip to content

Commit 8d9e44c

Browse files
committed
De-clutter assignment statements
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 5629ea5 commit 8d9e44c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/frequenz/sdk/actor/_power_managing/_matryoshka.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,8 @@ def _calc_target_power(
208208
upper_bound,
209209
exclusion_bounds,
210210
)
211-
proposal_lower, proposal_upper = (
212-
next_proposal.bounds.lower or lower_bound,
213-
next_proposal.bounds.upper or upper_bound,
214-
)
211+
proposal_lower = next_proposal.bounds.lower or lower_bound
212+
proposal_upper = next_proposal.bounds.upper or upper_bound
215213
# If the bounds from the current proposal are fully within the exclusion
216214
# bounds, then don't use them to narrow the bounds further. This allows
217215
# subsequent proposals to not be blocked by the current proposal.
@@ -350,10 +348,8 @@ def get_status(
350348
for next_proposal in reversed(self._battery_buckets.get(battery_ids, [])):
351349
if next_proposal.priority <= priority:
352350
break
353-
proposal_lower, proposal_upper = (
354-
next_proposal.bounds.lower or lower_bound,
355-
next_proposal.bounds.upper or upper_bound,
356-
)
351+
proposal_lower = next_proposal.bounds.lower or lower_bound
352+
proposal_upper = next_proposal.bounds.upper or upper_bound
357353
match _check_exclusion_bounds_overlap(
358354
proposal_lower, proposal_upper, exclusion_bounds
359355
):

0 commit comments

Comments
 (0)