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

Should await automatically manage parentheses like return? #275

Closed
ambv opened this issue May 29, 2018 · 1 comment · Fixed by #2991
Closed

Should await automatically manage parentheses like return? #275

ambv opened this issue May 29, 2018 · 1 comment · Fixed by #2991
Labels
F: parentheses Too many parentheses, not enough parentheses, and so on. S: needs discussion Needs further hashing out before ready for implementation (on desirability, feasibility, etc.) T: style What do we want Blackened code to look like?

Comments

@ambv
Copy link
Collaborator

ambv commented May 29, 2018

On a first glance, it would be better. On another though, await is an expression which can potentially complicate formattings that are now rather simple.

Alternatively, await should be ignored by an existing bracket pair for purposes of splitting on delimiters, enabling for example fluent interfaces.

@ambv ambv added T: enhancement New feature or request T: user support OP looking for assistance or answers to a question T: style What do we want Blackened code to look like? labels May 29, 2018
@ambv ambv added F: parentheses Too many parentheses, not enough parentheses, and so on. and removed T: enhancement New feature or request labels Jun 20, 2018
@ichard26 ichard26 removed the T: user support OP looking for assistance or answers to a question label Apr 28, 2021
@JelleZijlstra
Copy link
Collaborator

Concrete example:

% black -c 'return (a)'   
return a
% black -c 'await (a)' 
await (a)

@ichard26 ichard26 added the S: needs discussion Needs further hashing out before ready for implementation (on desirability, feasibility, etc.) label Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: parentheses Too many parentheses, not enough parentheses, and so on. S: needs discussion Needs further hashing out before ready for implementation (on desirability, feasibility, etc.) T: style What do we want Blackened code to look like?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants