Description
See issue for 2023 here: #3407
Here's what this issue is:
- I've listed all the features we have enabled under
--preview
- ...in descending order of how controversial I think they are
- I've also drawn a dividing line; past "uncontroversial" is where I feel we don't need to think twice about it
- I've listed the number of digits in the diff-shade lines changed count and linked original PR
- I tried to list any open issues next to the relevant preview feature, but it's possible I missed something
Issues tagged with(sorted these out–Jelle)preview
I haven't yet associated with a feature: Preview style: Preserve empty lines between async def and async for #3614 and string_processing: makes it impossible to use a comment to ignore a static type violation #3802
Here's the current call to action:
- Any comments / opinions / vibes on these features is very welcome
- Please test your codebase with
--preview
and let us know your thoughts! - If you have a specific problem with a preview feature, especially something that feels like an implementation issue, it's best to open a separate issue (that we can then link to from here)
For many of the changes, diff-shades logs have expired. We should find a way to keep these around for longer!
It's currently November, so there's still time to make more uncontroversial changes and hopefuly iron out some issues in the not uncontroversial ones.
Not uncontroversial
string_processing
This one is controversial, vast majority of preview style issues are related to string processing
Open issues I believe are caused by string_processing: #2334, #2314, #3466, #3497, #3409, #3424, #3428, #3210, #3410, #3747, #3665, #3663, #2553, #3855, #3802
hug_parens_with_braces_and_square_brackets (#3964, #3992)
Causes O(10000) changes, although counting lines changed is unfavourable to this change.
A very substantial change in style for Black. We can't revert once it's in stable.
Outstanding crash: #4036
parenthesize_conditional_expressions (#2278)
Causes O(1000) changes. Need to look at diff
Has unfortunate interactions with comments: #3555
wrap_long_dict_values_in_parens (#3440)
Causes O(100) changes. Need to look at diff
Outstanding crash: #3758
Report of worse splitting: #3452
Unnecessary nesting: #4129
Removes parentheses: #4158
multiline_string_handling (#1879)
Causes O(1000) changes. Need to look at diff
Maybe has some synergy with hug_parens_with_braces_and_square_brackets
.
Unfortunate white space preservation: #4159
dummy_implementations (#3796)
I can't find up-to-date diff-shades, but maybe O(1000) changes
Requires a change in flake8 config: #3887
Can result in an extra line, but no change expected to be made: #3872
prefer_splitting_right_hand_side_of_assignments (#3368)
Causes O(100) changes.
hex_codes_in_unicode_sequences (#2916)
Causes O(100) changes
Open issue whether lowercase or uppercase is better #3568
allow_empty_first_line_before_new_block_or_comment (#3967)
Causes O(1) changes.
This change itself is fine, but it's related to a controversial and churn causing change in 2023 style. I think we should probably revert that 2023 change; I posted a longer issue about this over here #4043
parenthesize_long_type_hints (#3899)
Causes O(100) changes
module_docstring_newlines (#3932)
Causes O(100) changes
Uncontroversial
respect_magic_trailing_comma_in_return_type (#3916)
O(10) changes.
Shouldn't affect existing formatting too much, unless there's a buggy trailing comma
All changes in diff-shades are incidental, but are good and what you'd expect Black to do
no_blank_line_before_class_docstring (#3692)
O(100) changes. Makes consistent with function behaviour
Blank lines have been a little controversial, but I think this should be totally fine
wrap_multiple_context_managers_in_parens (#3489)
O(100) changes. Naively, looks great to me
fix_power_op_line_length (#3942)
O(10) changes. A bug fix
add_trailing_comma_consistently (#3393)
O(1) changes. A bug fix
skip_magic_trailing_comma_in_subscript (#3209)
O(1) changes. A bug fix, affects a non-default option
blank_line_after_nested_stub_class (#3564)
Only affects stubs, adds some blank lines in an uncommon case
blank_line_between_nested_and_def_stub_file (#3862)
Only affects stubs, adds some blank lines in even less common case
accept_raw_docstrings (#3947)
O(1) changes. Just a bug fix
long_case_block_line_splitting (#4024)
0 changes. Seems strictly good
walrus_subscript (#3823)
0 changes. Straightforward style change
improved_async_statements_handling (#3609)
0 changes. More consistent
single_line_format_skip_with_multiple_comments (#3959)
0 changes. Makes life better
Activity