-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ruff 2025 style guide #13371
Comments
If anyone's interested in picking up one item on this list, let me know :) Happy to help |
One open question is whether we want to support multiple formatter edition (or at least one old edition). It took the community a long time to upgrade to Ruff 0.2 |
Hey @MichaReiser I'd be interested in picking up #11216. Let me know if this is alright. Thanks! |
Sure. Feel free to give it a go. I don't know what changes are necessary for it but feel free to comment on that issue with ideas or go ahead with a PR and we can discuss there. |
This comment was marked as outdated.
This comment was marked as outdated.
@dhruvmanila, do you remember what the open decisions were on the f-string formatting and what the remaining work is for it to be stabilized? Do you know if black implemented a similar formatting style? |
|
Regarding f-string formatting. We should look into whether it plays nicely with
From looking at the |
Black's plan is to stabilize all preview styles, but none of the unstable features which aligns with what I outlined in the summary. psf/black#4501 |
From Black's changelog. Last checked 16.09.2024, Last release: v24.8.0.
Goals:
Preview Styles
Black preview styles
remove_redundant_guard_parens
Parenthesizematch..case
if
guards #13513parens_for_long_if_clauses_in_case_block
(related toremove_redundant_guard_parens
): See #10969 Parenthesizematch..case
if
guards #13513no_normalize_fmt_skip_whitespace
: Don't normalize leading whitespace beforefmt: skip
comments.Black unstable styles
hug_parens_with_braces_and_square_brackets
]hug_parens_with_braces_and_square_brackets
and generators #11375: We decided not to support this style for now because it introduces new parentheses.wrap_long_dict_values_in_parens
non goal. Maybe a simplified version of it that only joins implicitly concatenated stringsmultiline_string_handling
Ruff preview styles
Ruff specific preview styles that we may want to stabilize
f_string_formatting
(style improvement)target-version
ispy312
#13237comprehension_leading_expression_comments_same_line
(bugfix)with_single_item_pre_39_enabled
(style improvement)f_string_implicit_concatenated_string_literal_quotes
(bugfix)Ruff improvements
remove_redundant_guard_parens
andparens_for_long_if_clauses_in_case_block
Open Bugs
Existing bugs in the ruff formatter for which no preview style exists.
Require a new style guide
Bug fixes that change how existing code is formatted and require a
dynamic
Bug fixes that don't change existing formatting
Bug fixes that don't require a new style guide because they don't change existing cod
;
fmt:skip
to suppress compound statementsBlack Bug fixes
Black preview styles that are related to Black-specific bug fixes. Ruff already handles those cases correctly
pep646_typed_star_arg_type_var_tuple
unify_docstring_detection
: Format module and single quoted docstringstyped_params_trailing_comma
is_simple_lookup_for_doublestar_expression
docstring_check_for_newline
pep646_typed_star_arg_type_var_tuple
The text was updated successfully, but these errors were encountered: