We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87b920f commit 5145b9cCopy full SHA for 5145b9c
tests/microgrid/test_client.py
@@ -604,8 +604,11 @@ async def test_set_bounds(self) -> None:
604
605
assert len(expected_bounds) == len(servicer.get_bounds())
606
607
- # pylint:disable=unnecessary-lambda-assignment
608
- sort_key = lambda bound: bound.target_metric
+ def sort_key(
+ bound: microgrid_pb.SetBoundsParam,
609
+ ) -> microgrid_pb.SetBoundsParam.TargetMetric.ValueType:
610
+ return bound.target_metric
611
+
612
assert sorted(servicer.get_bounds(), key=sort_key) == sorted(
613
expected_bounds, key=sort_key
614
)
0 commit comments