diff --git a/selfdrive/car/body/interface.py b/selfdrive/car/body/interface.py index 6b5ff2b4a9..9d3e1ccab6 100644 --- a/selfdrive/car/body/interface.py +++ b/selfdrive/car/body/interface.py @@ -6,7 +6,7 @@ from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.notCar = True ret.carName = "body" ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.body)] diff --git a/selfdrive/car/chrysler/interface.py b/selfdrive/car/chrysler/interface.py index e038472163..9092e92313 100755 --- a/selfdrive/car/chrysler/interface.py +++ b/selfdrive/car/chrysler/interface.py @@ -7,7 +7,7 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "chrysler" ret.dashcamOnly = candidate in RAM_HD diff --git a/selfdrive/car/ford/interface.py b/selfdrive/car/ford/interface.py index 89bd25a017..17f136b1be 100644 --- a/selfdrive/car/ford/interface.py +++ b/selfdrive/car/ford/interface.py @@ -10,7 +10,7 @@ TransmissionType = structs.CarParams.TransmissionType class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "ford" ret.dashcamOnly = bool(ret.flags & FordFlags.CANFD) diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index f76e98cc37..4f47dbde2c 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -80,7 +80,7 @@ class CarInterface(CarInterfaceBase): return self.torque_from_lateral_accel_linear @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "gm" ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.gm)] ret.autoResumeSng = False diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 620e41313e..54df6c2579 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -25,7 +25,7 @@ class CarInterface(CarInterfaceBase): return CarControllerParams.NIDEC_ACCEL_MIN, interp(current_speed, ACCEL_MAX_BP, ACCEL_MAX_VALS) @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "honda" CAN = CanBus(ret, fingerprint) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 63e2271c64..4530704ed2 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -15,7 +15,7 @@ ENABLE_BUTTONS = (Buttons.RES_ACCEL, Buttons.SET_DECEL, Buttons.CANCEL) class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "hyundai" ret.radarUnavailable = RADAR_START_ADDR not in fingerprint[1] or DBC[ret.carFingerprint]["radar"] is None diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index 9cb8797718..010490be6c 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -8,7 +8,7 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "mazda" ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.mazda)] ret.radarUnavailable = True diff --git a/selfdrive/car/mock/interface.py b/selfdrive/car/mock/interface.py index 9d01f6c691..d33cc7d164 100755 --- a/selfdrive/car/mock/interface.py +++ b/selfdrive/car/mock/interface.py @@ -7,7 +7,7 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "mock" ret.mass = 1700. ret.wheelbase = 2.70 diff --git a/selfdrive/car/nissan/interface.py b/selfdrive/car/nissan/interface.py index e9d8374d7d..4a9b31dacf 100644 --- a/selfdrive/car/nissan/interface.py +++ b/selfdrive/car/nissan/interface.py @@ -7,7 +7,7 @@ from openpilot.selfdrive.car.nissan.values import CAR class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "nissan" ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.nissan)] ret.autoResumeSng = False diff --git a/selfdrive/car/subaru/interface.py b/selfdrive/car/subaru/interface.py index e9ed1b2129..d392edc60b 100644 --- a/selfdrive/car/subaru/interface.py +++ b/selfdrive/car/subaru/interface.py @@ -8,7 +8,7 @@ from openpilot.selfdrive.car.subaru.values import CAR, GLOBAL_ES_ADDR, SubaruFla class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "subaru" ret.radarUnavailable = True # for HYBRID CARS to be upstreamed, we need: diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index ee3f22f57c..39586a8de8 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -15,7 +15,7 @@ class CarInterface(CarInterfaceBase): return CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX @staticmethod - def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "toyota" ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.toyota)] ret.safetyConfigs[0].safetyParam = EPS_SCALE[candidate] diff --git a/selfdrive/car/volkswagen/interface.py b/selfdrive/car/volkswagen/interface.py index 0d4f1e0ee3..96f3493fe8 100644 --- a/selfdrive/car/volkswagen/interface.py +++ b/selfdrive/car/volkswagen/interface.py @@ -6,7 +6,7 @@ from openpilot.selfdrive.car.volkswagen.values import CAR, NetworkLocation, Tran class CarInterface(CarInterfaceBase): @staticmethod - def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, experimental_long, docs): + def _get_params(ret: structs.CarParams, candidate: CAR, fingerprint, car_fw, experimental_long, docs) -> structs.CarParams: ret.carName = "volkswagen" ret.radarUnavailable = True