robotpy/robotpy-commands-v1

Command.getRequirements() has a bad return type

Closed this issue · 3 comments

>>> wpilib.command.Command().getRequirements()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Unable to convert function return value to a Python type! The signature was
        (self: wpilib.command._commands_v1.Command) -> wpi::SmallPtrSetImpl<frc::Subsystem * __ptr64>

Link to header: https://github.com/wpilibsuite/allwpilib/blob/7275ab98376a01db1ff75aced7260dc6f6f1237e/wpilibOldCommands/src/main/native/include/frc/commands/Command.h#L227

Yeah, this is going to need a type caster in robotpy-wpiutil I think. I'm sure I've seen a couple of other instances of SmallSets as well.

This is more than just a type caster I think, since it's a list of pointers.

Fixed in 06b1b0c