pylance-release
pylance-release copied to clipboard
Extract variable shouldn't work on assignments
Code Snippet
x = 1
Repro Steps
- Select
x = 1
and do "extract variable"
Expected behavior
Extract variable code action shouldn't show up.
Actual behavior
We get
new_var = x = 1
new_var
Copied the issue from https://github.com/microsoft/pylance-release/issues/5277#issuecomment-1861531993
how should i fix this issue,i am newcomer on github
how should i fix this issue,i am newcomer on github
Hi @soorajaryan007, I'm not sure what you're asking. If you're asking if you can submit a PR (code change) to fix this issue, the answer is no -- Pylance is closed source. If you're asking how to find a release of Pylance with this issue already fixed, there is no such release yet. Subscribe to this issue. When a fix is available we will comment here to tell you what build it is fixed in.
This issue has been fixed in prerelease version 2024.3.102, which we've just released. You can find the changelog here: CHANGELOG.md