Skip to content

Else statement auto-indent bug. #2367

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

Closed
Muldfox opened this issue Aug 10, 2018 · 1 comment
Closed

Else statement auto-indent bug. #2367

Muldfox opened this issue Aug 10, 2018 · 1 comment

Comments

@Muldfox
Copy link

Muldfox commented Aug 10, 2018

Environment data

  • VS Code version: 1.25.1
  • Extension version (available under the Extensions sidebar): Python (2018.7.1), Python for VSCode (0.2.3)
  • OS and version: Windows 10 (Version 1803, OS Build 17134.165)
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

foo = "test"

if isinstance(foo, str):
    print("It's a string")
    else:
        print("It's not a string")

Expected behavior

foo = "test"

if isinstance(foo, str):
    print("It's a string")
else:
    print("It's not a string")

Steps to reproduce:

  1. Create a if/else statement
  2. When you reach the else statement, it will not automatically indent

Additional information:

I have changed "editor.formatOnType" to "True" in user, workspace and folder settings.
I have also installed the extension "Python" as well as "Python for VSCode", and that did not help.

@d3r3kk
Copy link

d3r3kk commented Aug 10, 2018

Closing as a duplicate of known issue #771

@d3r3kk d3r3kk closed this as completed Aug 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants