Skip to content

Commit

Permalink
Simplify a < b < c comparison
Browse files Browse the repository at this point in the history
Co-authored-by: daniel-zullo-frequenz <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
  • Loading branch information
llucax and daniel-zullo-frequenz authored Aug 9, 2023
1 parent f034cc4 commit be9d239
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,7 @@ def _check_request(
#
# If the requested power is in the exclusion bounds, it is NOT possible to
# increase it so that it is outside the exclusion bounds.
if (
request.power > bounds.exclusion_lower
and request.power < bounds.exclusion_upper
):
if bounds.exclusion_lower < request.power < bounds.exclusion_upper:
return OutOfBound(request=request, bound=bounds)
else:
in_lower_range = (
Expand Down

0 comments on commit be9d239

Please sign in to comment.