mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Align formatting of patterns in match-cases with expression formatting in clause headers (#13510)
This commit is contained in:
parent
d7ffe46054
commit
8012707348
12 changed files with 1608 additions and 40 deletions
|
@ -36,3 +36,9 @@ pub(crate) fn is_empty_parameters_no_unnecessary_parentheses_around_return_value
|
|||
) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
||||
/// See [#6933](https://github.com/astral-sh/ruff/issues/6933).
|
||||
/// This style also covers the black preview styles `remove_redundant_guard_parens` and `parens_for_long_if_clauses_in_case_block `.
|
||||
pub(crate) fn is_match_case_parentheses_enabled(context: &PyFormatContext) -> bool {
|
||||
context.is_preview()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue