mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
![]() <!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary This PR matches Black' behavior where it only omits the optional parentheses if the expression starts or ends with a parenthesized expression: ```python a + [aaa, bbb, cccc] * c # Don't omit [aaa, bbb, cccc] + a * c # Split a + c * [aaa, bbb, ccc] # Split ``` <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan This improves the Jaccard index from 0.945 to 0.946 |
||
---|---|---|
.. | ||
expr_attribute.rs | ||
expr_await.rs | ||
expr_bin_op.rs | ||
expr_bool_op.rs | ||
expr_call.rs | ||
expr_compare.rs | ||
expr_constant.rs | ||
expr_dict.rs | ||
expr_dict_comp.rs | ||
expr_formatted_value.rs | ||
expr_generator_exp.rs | ||
expr_if_exp.rs | ||
expr_joined_str.rs | ||
expr_lambda.rs | ||
expr_list.rs | ||
expr_list_comp.rs | ||
expr_name.rs | ||
expr_named_expr.rs | ||
expr_set.rs | ||
expr_set_comp.rs | ||
expr_slice.rs | ||
expr_starred.rs | ||
expr_subscript.rs | ||
expr_tuple.rs | ||
expr_unary_op.rs | ||
expr_yield.rs | ||
expr_yield_from.rs | ||
mod.rs | ||
parentheses.rs | ||
string.rs |