Skip to content

Else statement auto-indent bug. #2367

Closed

Description

@Muldfox

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.

Activity

  1. d3r3kk commented on Aug 10, 2018

    @d3r3kk

    Closing as a duplicate of known issue #771

  2. locked as resolved and limited conversation to collaborators on Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions