Instead of this weird vscode trick:
|
def __init__(self, car, controller, controller_sp, env, detection, path_planner, checkpoints=None, desired_speed=0.3, debug=True): |
|
print("Initialize brain") |
|
self.car = Automobile_Data() #not needed, just to import he methods in visual studio |
|
self.car = car |
One could use python typization features:
def __init__(self, car: Automobile_Data):
self.car = car
And vscode would recognize the available methods and attributes in self.car are the ones of instances of class Automobile_Data
Instead of this weird vscode trick:
bfmc_2022/Simulator/brain.py
Lines 238 to 241 in 2669d22
One could use python typization features:
And vscode would recognize the available methods and attributes in
self.carare the ones of instances of classAutomobile_Data