going threw the instructions on refactor python code:
Select the source code you’d like to extract and then select the light bulb in the gutter or press refactor to see available refactorings. Source code fragments can be extracted into a new method, or into a new function at various different scopes. During the extract refactoring, you are prompted to provide a meaningful name.
I have the same issue, but for me it is persistent, no matter what I do (nuke cursor and reinstalled, play with the extensions.. none), no one in my team could identify the issue, and it’s a problem with new cursor version.
It is related to the language server being set to None no matter what I do (and it might be related to the fact that Pylance extension is not discoverable in the extension panel)
Thank you for bringing that topic up, in the forum there are already threads on refactoring and its sometimes hard to find a duplicate due to many messages being posted.
Could you check if following is related to your issue?
hi,
its not related to this refactor. as I see it there are several issues with the language server since the anysphere ext change.
those server actions are very fundamental actions in python development.
actually, this is the first things that IDE should bring to the developer, before AI agent.
this thread is more about the “Extract Method” operation. (there are more actions that not exists here. but this is the most important)
Hi all, thank you for this request. As of the moment, we do not support the refactor actions (other than rename) in our Python extension. As @condor suggested, could you create an issue in the DetachHead/basedpyright GitHub? Our extension is based on this, so we’ll port over any features/improvements they add.