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

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

Closed
DonJayamanne opened this issue May 29, 2018 · 3 comments · Fixed by #1798
Closed

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

DonJayamanne opened this issue May 29, 2018 · 3 comments · Fixed by #1798
Assignees
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@DonJayamanne
Copy link

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")
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug needs PR area-formatting labels May 29, 2018
@DonJayamanne DonJayamanne changed the title Format on type with brackets in conditional statements Format on type with brackets in conditional statements removes empty space May 29, 2018
@DonJayamanne DonJayamanne added this to the May 2018 milestone May 29, 2018
@MikhailArkhipov
Copy link

Check cases in #1791

@brettcannon
Copy link
Member

This also affects while and assert.

@brettcannon
Copy link
Member

Might to also need to check await.

@MikhailArkhipov MikhailArkhipov self-assigned this May 30, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants