diff --git a/selfdrive/car/values.py b/selfdrive/car/values.py index dfbcf3b74f..bf5d378ab4 100644 --- a/selfdrive/car/values.py +++ b/selfdrive/car/values.py @@ -1,4 +1,4 @@ -from typing import cast +from typing import get_args from openpilot.selfdrive.car.body.values import CAR as BODY from openpilot.selfdrive.car.chrysler.values import CAR as CHRYSLER from openpilot.selfdrive.car.ford.values import CAR as FORD @@ -14,6 +14,6 @@ from openpilot.selfdrive.car.toyota.values import CAR as TOYOTA from openpilot.selfdrive.car.volkswagen.values import CAR as VOLKSWAGEN Platform = BODY | CHRYSLER | FORD | GM | HONDA | HYUNDAI | MAZDA | MOCK | NISSAN | SUBARU | TESLA | TOYOTA | VOLKSWAGEN -BRANDS = [BODY, CHRYSLER, FORD, GM, HONDA, HYUNDAI, MAZDA, MOCK, NISSAN, SUBARU, TESLA, TOYOTA, VOLKSWAGEN] +BRANDS = get_args(Platform) -PLATFORMS: dict[str, Platform] = {str(platform): platform for brand in BRANDS for platform in cast(list[Platform], brand)} +PLATFORMS: dict[str, Platform] = {str(platform): platform for brand in BRANDS for platform in brand}