Conversation
|
8e7f818 to
073aa7f
Compare
|
I reviewed the changes introduced by the new style by formatting a few large projects. Most style changes show up infrequently (or even never). The following three changes result in many changes and can be very disruptive when upgrading.
|
9e0a769 to
18dab48
Compare
18dab48 to
f58ca32
Compare
|
It seems to me that this should be split in two: Ruff should quickly stabilize the features corresponding to the Black 2024 stable style, leaving more time to consider the other more controversial features. Although I’m personally a fan of all three of them, I think maintaining Black compatibility by default is more important for now. |
|
We discussed this internally and agree with @andersk that we want to keep close compatibility with Black for now. We don't mind shipping improvements that produce small or no diffs when migrating from Black to Ruff (not necessarily the other way around). This includes the following preview changes that Black did not ship
We don't plan on shipping |
f58ca32 to
1718d92
Compare
1718d92 to
368bfc4
Compare
| # leading function comment | ||
| -def decorated1(): | ||
| - ... | ||
| +def decorated1(): ... |
There was a problem hiding this comment.
We need to update our test snapshots to pull in the stable black formattings.
368bfc4 to
4166342
Compare
Summary
This PR promotes Ruff's preview formatter styles to stable.
fix_power_op_line_lengthprefer_splitting_right_hand_side_of_assignmentsparenthesize_long_type_hintsno_blank_line_before_class_docstringwrap_multiple_context_managers_in_parensblank_line_after_nested_stub_classmodule_docstring_newlinesdummy_implementationshex_codes_in_unicode_sequencesmultiline_string_handlingformat_module_docstringDifferences to black:
multiline-stringBlack didn't stabilizeis_hug_parens_with_braces_and_square_bracketshex_codes_in_unicode_sequences#8678
Test Plan