add preview function

This commit is contained in:
Brent Westbrook 2025-10-20 13:14:32 -04:00
parent 615e1a17eb
commit 5329c8ca40
1 changed files with 6 additions and 0 deletions

View File

@ -36,3 +36,9 @@ pub(crate) const fn is_remove_parens_around_except_types_enabled(
) -> bool { ) -> bool {
context.is_preview() context.is_preview()
} }
/// Returns `true` if the [`wrap_comprehension_in`](https://github.com/astral-sh/ruff/pull/TODO)
/// preview style is enabled.
pub(crate) const fn is_wrap_comprehension_in_enabled(context: &PyFormatContext) -> bool {
context.is_preview()
}