Use space separator before parenthesiszed expressions in comprehensions with leading comments. (#12282)

This commit is contained in:
Micha Reiser 2024-07-11 22:38:12 +02:00 committed by GitHub
parent d0298dc26d
commit bd01004a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 274 additions and 6 deletions

View file

@ -22,3 +22,10 @@ pub(crate) fn is_f_string_formatting_enabled(context: &PyFormatContext) -> bool
pub(crate) fn is_with_single_item_pre_39_enabled(context: &PyFormatContext) -> bool {
context.is_preview()
}
/// See [#12282](https://github.com/astral-sh/ruff/pull/12282).
pub(crate) fn is_comprehension_leading_expression_comments_same_line_enabled(
context: &PyFormatContext,
) -> bool {
context.is_preview()
}