Tool Tips / Autocomplete in Python

I’ve noticed that the tooltips and/or prototype function documentation from autocomplete doesn’t match the API documentation in many cases. I’m open to the feedback that I’m missing something or using it incorrectly, but wanted to ask?

For example:

Autcomplete doesn’t suggest FWD or REV, but autocomplete will pull up vex.DirectionType, only with a capital D. For velocityUnits it’s the same thing, it will pull up vex.VelocityUnits, but the tooltip doesn’t really point you in that direction.

The API documentation doesn’t seem to spell that out well either:

So it’s all figure-out-able, but fairly confounding to the novice or first time RMS user, I think.

Am I using the environment correctly?

Thanks for bringing this to my attention. I’ll have someone take a look.

Yes, you are using it correctly. Part of the weirdness you are seeing is that the tooltip has resolved vex.VelocityUnits.PCT completely: its value is 0. If you look at the vex.VelocityUnits page, it lists PCT, RPM, and DPS. It gives these the values vex.PercentUnits.PCT, 1, and 2, respectively. If you go look at the vex.PercentUnits page, vex.PercentUnits.PCT is… 0. So for the argument velocityUnits, the documentation contains an alias of zero as the default and the tooltip just tells you that it defaults to zero.

As for suggesting FWD and REV, those should not be suggested, as they are members of the vex.DirectionType class. They should only be suggested when prefaced with vex.DirectionType. What you have typed in your screenshot will cause an error at run time. The tooltip should probably reflect that the FWD or REV it’s asking for come from vex.DirectionType, and are not globals.

The capitalization difference you are seeing is the difference between spin’s arguments and actual classes with similar names: direction vs. vex.DirectionType; velocityUnits vs. vex.VelocityUnits.

There’s definitely room for improvement on our autocomplete’s abilities and tooltips’ clarity, but I haven’t come across anything that’s plain wrong in a while now. There are improvements to these on the to-do list, but they have not made it into development yet (as of last development cycle, which shipped yesterday).

Thanks for the comprehensive response - that’s all very helpful.