-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
🏖️ Black 2024 Preview Style #8678
Comments
This was referenced Nov 14, 2023
1 task
This was referenced Dec 22, 2023
Merged
This was referenced Feb 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Black is planning to stabilize a subset of the preview style as stable style for 2024 (psf/black#4042). Ruff implements a subset of the current preview style, and subsequently a subset of the planned stable style.
For each of the unchecked items below, we need to port the test case to ruff, implement the changed behavior under the preview flag and tick off the box below. For two of the changes, we will need to introduce target version support to the formatter (same as in the linter).
Shipped in Ruff Stable
These are mainly bug fixes to Black that we didn't inherit or shipping them right away simplified the implementation and are uncontroversial.
respect_magic_trailing_comma_in_return_type
add_trailing_comma_consistently
skip_magic_trailing_comma_in_subscript
: Requires--skip-magic-trailing-comma
blank_line_between_nested_and_def_stub_file
: Only applies to stub files (.pyi
)accept_raw_docstrings
long_case_block_line_splitting
, although our formatting may not be a 100% correct. See Can omit parentheses layout for patterns #6933walrus_subscript
preview style #8887Likely to be stabilized
Styles that with a high likelihood to be promoted to Black stable and are part of the 2024 alpha release.
no_blank_line_before_class_docstring
preview style #8888wrap_multiple_context_managers_in_parens
preview style #8889improved_async_statements_handling
preview style #8890blank_line_after_nested_stub_class
preview style #8891single_line_format_skip_with_multiple_comments
preview style #8892dummy_implementations
preview style #8357prefer_splitting_right_hand_side_of_assignments
preview style #6975allow_empty_first_line_before_new_block_or_comment
preview style #8893parenthesize_long_type_hints
preview style #8894module_docstring_newlines
) #7995allow_form_feeds
preview style #8895fix_power_op_line_length
preview style #8938Not uncontroversial preview features that are likely be stabilized
multiline_string_handling
preview style #8896wrap_long_dict_values_in_parens
preview style #8897parenthesize_conditional_expressions
preview style #8438Unlikely to be stabilized in 2024
string_processing
preview style #6936hex_codes_in_unicode_sequences
(PR). More string normalization @MichaReiserhug_parens_with_braces_and_square_brackets
preview style #8279Gather feedback
Notes
We might have to remove some preview styles from ruff, but removing the preview clause is enough that we can delay until black's changes are finalized
Reference test file
The text was updated successfully, but these errors were encountered: