From e217604b20e7c3122a30ecbbe4486d0bb5fef2f4 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Tue, 9 Sep 2025 02:14:07 -0400 Subject: [PATCH] lint --- .../lib/speed_limit_controller/speed_limit_resolver.py | 2 +- .../tests/test_speed_limit_controller.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_resolver.py b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_resolver.py index d92df09f7f..d76ffcd8eb 100644 --- a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_resolver.py +++ b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_resolver.py @@ -115,7 +115,7 @@ class SpeedLimitResolver: return source limits = np.array([self._limit_solutions[source] for source in sources_for_policy], dtype=float) - sources = np.array([source for source in sources_for_policy], dtype=int) + sources = np.array(sources_for_policy, dtype=int) if len(limits) > 0: min_idx = np.argmin(limits) diff --git a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/tests/test_speed_limit_controller.py b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/tests/test_speed_limit_controller.py index 3f09a977b5..66aead5c68 100644 --- a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/tests/test_speed_limit_controller.py +++ b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/tests/test_speed_limit_controller.py @@ -215,7 +215,8 @@ class TestSpeedLimitController: def test_long_disengaged_to_disabled(self): self.initialize_active_state(REQUIRED_INITIAL_MAX_SET_SPEED) - v_cruise_slc = self.slc.update(False, SPEED_LIMITS['city'], 0, REQUIRED_INITIAL_MAX_SET_SPEED, SPEED_LIMITS['city'], 0, SpeedLimitSource.car, self.events_sp) + v_cruise_slc = self.slc.update(False, SPEED_LIMITS['city'], 0, REQUIRED_INITIAL_MAX_SET_SPEED, SPEED_LIMITS['city'], + 0, SpeedLimitSource.car, self.events_sp) assert self.slc.state == SpeedLimitControlState.disabled assert v_cruise_slc == V_CRUISE_UNSET