cars: update platforms typing syntax (#31586)

old-commit-hash: be8e503a7d
chrysler-long2
Cameron Clough 1 year ago committed by GitHub
parent 53a544b029
commit 2c33be7a9c
  1. 4
      selfdrive/car/values.py

@ -1,4 +1,4 @@
from typing import List, cast, Dict
from typing import cast
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
@ -15,4 +15,4 @@ from openpilot.selfdrive.car.volkswagen.values import CAR as VOLKSWAGEN
Platform = BODY | CHRYSLER | FORD | GM | HONDA | HYUNDAI | MAZDA | NISSAN | SUBARU | TESLA | TOYOTA | VOLKSWAGEN
BRANDS = [BODY, CHRYSLER, FORD, GM, HONDA, HYUNDAI, MAZDA, NISSAN, SUBARU, TESLA, TOYOTA, VOLKSWAGEN]
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 cast(list[Platform], brand)}

Loading…
Cancel
Save