Align formatting of patterns in match-cases with expression formatting in clause headers (#13510)

This commit is contained in:
Micha Reiser 2024-09-26 08:35:22 +02:00 committed by GitHub
parent d7ffe46054
commit 8012707348
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1608 additions and 40 deletions

View file

@ -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()
}