Ruff 2025 style guide #13371
Labels
formatter
Related to the formatter
help wanted
Contributions especially welcome
style
How should formatted code look
From Black's changelog. Last checked 16.09.2024, Last release: v24.8.0.
Goals:
Preview Styles
Black preview styles
remove_redundant_guard_parens
parens_for_long_if_clauses_in_case_block
(related toremove_redundant_guard_parens
): See #10969no_normalize_fmt_skip_whitespace
: Don't normalize leading whitespace beforefmt: skip
comments.wrap_long_dict_values_in_parens
: We decided not to support this style for now because it introduces new parentheses.multiline_string_handling
non goal. Maybe a simplified version of it that only joins implicitly concatenated stringshug_parens_with_braces_and_square_brackets
]hug_parens_with_braces_and_square_brackets
and generators #11375Ruff 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)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: