When my cursor is over a command, I get its documentation.
But if I right click the command and go to its definition, there I see the true state of affairs. Note how the parameters
value
and amount
are reversed.
In my code, I've always been passing
amount
, then value
for this particular method, because that's what the documentation had always shown. Then one day I noticed the documentation for some commands was different from how I remembered it.
This method is from a redis
package for python (https://github.com/andymccurdy/redis-py), and in that page they specifically note this change of argument order from version 2.X to 3.X. My IDE shows me the 2.X documentation, but uses the code of 3.X. I created a virtual environment, activated it, and installed the latest version of this package. A pip freeze
inside my env confirms this: redis==3.5.0
. And my IDE is set to use this env (bottom left corner in VSCode for mac).
Any idea what's going on here and how to fix this? Also, in case it's worth mentioning, when I was taking those screenshots, I noticed that if I hold down cmd while the incorrect documentation is showing, the correct documentation appears above it. I'm not sure what that does, never held cmd while hovering over a method before.