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

Formatter: walrus_subscript preview style #8887

Closed
Tracked by #8678
MichaReiser opened this issue Nov 29, 2023 · 1 comment
Closed
Tracked by #8678

Formatter: walrus_subscript preview style #8887

MichaReiser opened this issue Nov 29, 2023 · 1 comment
Labels
formatter Related to the formatter help wanted Contributions especially welcome

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Nov 29, 2023

Implement Black's walrus_subscript preview style.

Ruff already ships the fix in its stable style but there's a difference for parenthesized walrus operators. I created an issue in the Black repository to align on the desired style.

We should copy over black's new tests and fix the deviation if necessary

@MichaReiser MichaReiser changed the title walrus_subscript Implemented, but may require a bugfix for parenthesized walrus operators. Ruff keeps the whitespace in front of the : (x[(a := 0) :]), black removes it (x[(a := 0):]). Formatter: walrus_subscript preview style Nov 29, 2023
@MichaReiser MichaReiser added the formatter Related to the formatter label Nov 29, 2023
@MichaReiser MichaReiser added this to the Formatter: Stable milestone Nov 29, 2023
@MichaReiser MichaReiser added the help wanted Contributions especially welcome label Nov 29, 2023
@MichaReiser
Copy link
Member Author

Acknowledge as a bug in black. Closing as complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter help wanted Contributions especially welcome
Projects
None yet
Development

No branches or pull requests

1 participant