Note that a new extension, that works alongside the original python extension, has been developed by Microsoft: Pylance. It speeds things up based on pyright, a python type-checker.
For refactoring you can use rope [0] as a VSCode extension.
However, I was also having a lot of trouble with environment variables, especially PYTHONPATH. How do you solve that?
Also rope did NOT work well for me. When I tried to refactor (rename) a function definition, it also changed variables in unrelated scopes that had the same name and were not related to the function at all. So I did not gain anything from that which I couldn't achieve using CTRL+F replace.
I haven't used rope extensively, it's too bad that it doesn't work well. It's open source so I guess it needs more contributions.
“Rope is not installed. Install?” - so I need a package in my virtual env just to rename variables?
“Rope is installed. Refactoring failed”.
This is really frustrating. Am I doing something wrong?