mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-02 01:43:04 +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 |
||
---|---|---|
.. | ||
flake8_to_ruff | ||
ruff | ||
ruff_benchmark | ||
ruff_cache | ||
ruff_cli | ||
ruff_dev | ||
ruff_diagnostics | ||
ruff_formatter | ||
ruff_index | ||
ruff_macros | ||
ruff_python_ast | ||
ruff_python_formatter | ||
ruff_python_resolver | ||
ruff_python_semantic | ||
ruff_python_stdlib | ||
ruff_python_whitespace | ||
ruff_rustpython | ||
ruff_textwrap | ||
ruff_wasm |