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

Black keeps redundant parentheses around optional kwarg invocation #1151

Closed
dimaqq opened this issue Nov 11, 2019 · 1 comment
Closed

Black keeps redundant parentheses around optional kwarg invocation #1151

dimaqq opened this issue Nov 11, 2019 · 1 comment
Labels
R: duplicate This issue or pull request already exists T: style What do we want Blackened code to look like?

Comments

@dimaqq
Copy link

dimaqq commented Nov 11, 2019

(xx-wNEHA9fb-py3.8) … ~/xx> black x.py
All done! ✨ 🍰 ✨
1 file left unchanged.
(xx-wNEHA9fb-py3.8) … ~/xx> cat x.py
foo(a=1, **{"b": 2} if bar() else {}, c=3)
foo(a=1, **({"b": 2} if bar() else {}), c=3)

Somehow black considers both OK, which makes me wonder, if perhaps black somehow considers the two different.

black, version 19.10b0
Python 3.8.0
@dimaqq dimaqq added the T: style What do we want Blackened code to look like? label Nov 11, 2019
@ichard26 ichard26 added the R: duplicate This issue or pull request already exists label May 30, 2021
@ichard26
Copy link
Collaborator

Closing since this is a duplicate of #1123. Thank you for the suggestion though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R: duplicate This issue or pull request already exists T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

2 participants