From ef938df6703f00b948a5fadd81232f2b8d1c7aec Mon Sep 17 00:00:00 2001 From: rav4kumar Date: Tue, 15 Sep 2026 15:14:45 -0700 Subject: [PATCH] lint --- openpilot/selfdrive/controls/tests/test_longcontrol.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpilot/selfdrive/controls/tests/test_longcontrol.py b/openpilot/selfdrive/controls/tests/test_longcontrol.py index 4658c655b6..ea54560a66 100644 --- a/openpilot/selfdrive/controls/tests/test_longcontrol.py +++ b/openpilot/selfdrive/controls/tests/test_longcontrol.py @@ -1,4 +1,5 @@ from types import SimpleNamespace +from typing import cast from openpilot.common.test import OpenpilotTestCase from openpilot.cereal import custom @@ -51,12 +52,12 @@ class TestStoppingHold: def test_weak_brake_does_not_hold_stopping(self): control = SimpleNamespace(last_output_accel=-0.109) car_state = SimpleNamespace(vEgo=0.277, aEgo=-0.406) - assert not LongControlSP.should_hold_stopping(control, car_state, -0.072) + assert not LongControlSP.should_hold_stopping(cast(LongControlSP, control), car_state, -0.072) def test_sufficient_brake_holds_stopping(self): control = SimpleNamespace(last_output_accel=-0.543) car_state = SimpleNamespace(vEgo=0.209, aEgo=-0.534) - assert LongControlSP.should_hold_stopping(control, car_state, -0.469) + assert LongControlSP.should_hold_stopping(cast(LongControlSP, control), car_state, -0.469) def test_stopping_decel_rate_is_smooth_while_rolling(self): assert LongControlSP.stopping_decel_rate(0.1) == 0.3