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

Force parentheses for power operations in unary expressions #7955

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

charliermarsh
Copy link
Member

Summary

E.g., given -10**100, reformat as -(10**100).

Black special cases this (psf/black#909) and it's currently a deviation.

Closes #7951.

@charliermarsh charliermarsh added bug Something isn't working formatter Related to the formatter labels Oct 13, 2023
@charliermarsh charliermarsh merged commit 3d03e75 into main Oct 16, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/bin-op branch October 16, 2023 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter Related to the formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parentheses around power operations
2 participants