You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current state:
robotController = robotModel.cast(RobotController, args)
Wish:
robotController = RobotController(robotModel, args..)
the would require to override the __init__ to accept another base model that is converted to a dict that is de-packed to the actual contructor __init__(Union[BaseModel, kwargs])
Potential issue: Static code checking might be altered / validation might be corrupted
validation not as long as we call the actual class constructor.
Static code checking should work since the return type of the target class contructor is the target class
Current state:
robotController = robotModel.cast(RobotController, args)
Wish:
robotController = RobotController(robotModel, args..)
the would require to override the
__init__
to accept another base model that is converted to a dict that is de-packed to the actual contructor__init__(Union[BaseModel, kwargs])
see also: https://stackoverflow.com/questions/71895185/convert-derived-class-to-base-class-in-python/77446717#77446717
The text was updated successfully, but these errors were encountered: