I am trying to rename a python file and want to have all the import instances updated with as well.
Based on the below link, there should be a pop up window every time I rename a file and Pylance will find all the instances and ask to refactor:
https://code.visualstudio.com/docs/python/editing#_autocomplete-and-intellisense
However I am not getting this pop up window at all… does anyone know what the issue is?
2
Answers
I can confirm this is a bug of Pylance extension for VSCode on Windows platform.
I’ve tested with VSCode 1.83.1 on Windows 10 and the following Pylance version.
Won’t work:
Module renaming works:
If you absolutely need the module renaming functionality on VSCode for Windows, stick to Pylance v2023.10.10 until there is a new version which fixes this bug. See: How to install previous versions of extensions
I submit this issue to github. And now this bug has been fixed in pre-release version 2023.10.31.
You can switch to pre-release version in extension store to solve it.