pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Extract variable shouldn't work on assignments

Open StellaHuang95 opened this issue 1 year ago • 3 comments

Code Snippet

x = 1

Repro Steps

  1. 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

StellaHuang95 avatar Jan 09 '24 19:01 StellaHuang95

Copied the issue from https://github.com/microsoft/pylance-release/issues/5277#issuecomment-1861531993

StellaHuang95 avatar Jan 09 '24 19:01 StellaHuang95

how should i fix this issue,i am newcomer on github

soorajaryan007 avatar Jan 10 '24 11:01 soorajaryan007

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.

debonte avatar Jan 10 '24 19:01 debonte

This issue has been fixed in prerelease version 2024.3.102, which we've just released. You can find the changelog here: CHANGELOG.md

StellaHuang95 avatar Mar 27 '24 20:03 StellaHuang95