Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong indentation when extracting variable in Python #448

Open
AckslD opened this issue Mar 7, 2024 · 0 comments
Open

Wrong indentation when extracting variable in Python #448

AckslD opened this issue Mar 7, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@AckslD
Copy link

AckslD commented Mar 7, 2024

Consider the following code:

if False:
    pass
x = |1 + 2|

where | denotes the visual selection. If I extract a variable y I get:

if False:
    pass
    y = 1 + 2
x = y

Which is not what I want since y might then not be defined since it's in the body of the above if-statement. I would instead expect:

if False:
    pass
y = 1 + 2
x = y
@TheLeoP TheLeoP added the help wanted Extra attention is needed label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants