RoboDK-API icon indicating copy to clipboard operation
RoboDK-API copied to clipboard

robolink.py type-hinting missing for setAsJointTarget and setAsCartesianTarget methods

Open sjohnson-FLL opened this issue 1 year ago • 1 comments

In robolink.py, the Item class has setAsCartesianTarget and setAsJointTarget methods. In both cases, these methods conclude with return self, which would return an instance of the Item class. While other methods around it have type-hinting for the returned values, this method is not type-hinted for 'Item'.

To fix, either:

  1. Add ->'Item' type-hinting to the return values of those methods.
  2. Remove return self from those methods. (Breaks backwards-compatibility, but this return behavior was never documented in the first place anyway.)

sjohnson-FLL avatar Jun 24 '24 18:06 sjohnson-FLL