From Black's changelog. Last checked 16.09.2024, Last release: v24.8.0.
Goals:
- Close parity with Black when migrating from Black to Ruff
- Fix Ruff specific bugs
- Innovate on local formatting (to keep close parity with black)
Preview Styles
Black preview styles
Black unstable styles
Ruff preview styles
Ruff specific preview styles that we may want to stabilize
Ruff improvements
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
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
Black Bug fixes
Black preview styles that are related to Black-specific bug fixes. Ruff already handles those cases correctly
Needs fixing
From Black's changelog. Last checked 16.09.2024, Last release: v24.8.0.
Goals:
Preview Styles
Black preview styles
remove_redundant_guard_parensParenthesizematch..caseifguards #13513parens_for_long_if_clauses_in_case_block(related toremove_redundant_guard_parens): See #10969 Parenthesizematch..caseifguards #13513no_normalize_fmt_skip_whitespace: Don't normalize leading whitespace beforefmt: skipcomments.Black unstable styles
hug_parens_with_braces_and_square_brackets]hug_parens_with_braces_and_square_bracketsand generators #11375: We decided not to support this style for now because it introduces new parentheses.wrap_long_dict_values_in_parensnon goal. Maybe a simplified version of it that only joins implicitly concatenated stringsmultiline_string_handlingRuff preview styles
Ruff specific preview styles that we may want to stabilize
f_string_formatting(style improvement)target-versionispy312#13237ruff] Formatting hex codes changes output with f-string debug #14766comprehension_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_parensandparens_for_long_if_clauses_in_case_blockOpen 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
dynamicBug 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:skipto 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_tupleunify_docstring_detection: Format module and single quoted docstringstyped_params_trailing_commais_simple_lookup_for_doublestar_expressiondocstring_check_for_newlinepep646_typed_star_arg_type_var_tupleNeeds fixing
ifexpression inside it #14778