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

Other changes (discovered in test files) #8904

Closed
2 tasks done
Tracked by #8678
MichaReiser opened this issue Nov 29, 2023 · 4 comments
Closed
2 tasks done
Tracked by #8678

Other changes (discovered in test files) #8904

MichaReiser opened this issue Nov 29, 2023 · 4 comments
Labels
formatter Related to the formatter preview Related to preview mode features

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Nov 29, 2023

Changes to Black's formatting that seem to change but have no explicit preview feature?

@MichaReiser MichaReiser added formatter Related to the formatter preview Related to preview mode features labels Nov 29, 2023
@MichaReiser MichaReiser added this to the Formatter: Stable milestone Nov 29, 2023
@dhruvmanila
Copy link
Member

(Updated the description to link the files from the Black repository.)

@charliermarsh
Copy link
Member

This is relevant: psf/black#3942

@MichaReiser
Copy link
Member Author

This is relevant: psf/black#3942

Nice find. I assumed we implemented this correctly. I opened #8938

@MichaReiser
Copy link
Member Author

preview_percent_precedence seems to be about Black removing parentheses for % operations in some case. This feels surprising because it would be the only place where black removes parentheses in sub-expressions (and what if the __mod__ operator is overloaded?).

I don't think we should implement this change to avoid potentially changing the AST.

@MichaReiser MichaReiser closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter preview Related to preview mode features
Projects
None yet
Development

No branches or pull requests

3 participants