mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-17 23:42:07 +08:00
lint
This commit is contained in:
@@ -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)
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user