Skip to content

Format on type with brackets in conditional statements removes empty space #1780

Closed

Description

if (True): changes to if(True):

Yes, that's non-pythonic code, but here's a better example:

x = [(1,1), (2,2)]
if (1,1) in x:        
    print("yay")

Changes to:

x = [(1,1), (2,2)]
if(1,1) in x:        
    print("yay")

Activity

  1. changed the title [-]Format on type with brackets in conditional statements[/-] [+]Format on type with brackets in conditional statements removes empty space[/+] on May 29, 2018
  2. MikhailArkhipov commented on May 29, 2018

    @MikhailArkhipov

    Check cases in #1791

  3. brettcannon commented on May 29, 2018

    @brettcannon
    Member

    This also affects while and assert.

  4. brettcannon commented on May 29, 2018

    @brettcannon
    Member

    Might to also need to check await.

  5. locked as resolved and limited conversation to collaborators on Jul 10, 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