Skip to content

Single line statements leading to an indentation on the next line #1308

Closed

Description

Environment data

  • VS Code version: insiders
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

sample

Expected behavior

There should be no added indentation.

Steps to reproduce:

  1. Turn on "editor.formatOnType": true
  2. Type e.g. if 1<=2: pass
  3. Press Enter

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

N/A

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

N/A

Activity

  1. MikhailArkhipov commented on Apr 5, 2018

    @MikhailArkhipov

    Indentation has nothing to do with formatting. It is controlled by regex VS Code is using.

  2. MikhailArkhipov commented on Apr 5, 2018

    @MikhailArkhipov

    Same as #726. Closing as dupe.

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

Metadata

Metadata

Labels

area-formattingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions