Car docs: utilize post init (#30912)

move these to earlier post_init
old-commit-hash: 002ab5637b
pull/32199/head
Shane Smiskol 1 year ago committed by GitHub
parent 750b5c15cf
commit 3618a2a007
  1. 6
      selfdrive/car/docs_definitions.py

@ -244,10 +244,13 @@ class CarInfo:
# all the parts needed for the supported car
car_parts: CarParts = field(default_factory=CarParts)
def __post_init__(self):
self.make, self.model, self.years = split_name(self.name)
self.year_list = get_year_list(self.years)
def init(self, CP: car.CarParams, all_footnotes: Dict[Enum, int]):
self.car_name = CP.carName
self.car_fingerprint = CP.carFingerprint
self.make, self.model, self.years = split_name(self.name)
# longitudinal column
op_long = "Stock"
@ -309,7 +312,6 @@ class CarInfo:
self.row[Column.STEERING_TORQUE] = Star.FULL
self.all_footnotes = all_footnotes
self.year_list = get_year_list(self.years)
self.detail_sentence = self.get_detail_sentence(CP)
return self

Loading…
Cancel
Save