From e18ead10e16e2945bd81330e4732a372321a802a Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Tue, 21 Oct 2025 12:19:21 -0400 Subject: [PATCH] docs --- crates/ruff_python_formatter/src/expression/parentheses.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ruff_python_formatter/src/expression/parentheses.rs b/crates/ruff_python_formatter/src/expression/parentheses.rs index 20bc183831..fa077eecbd 100644 --- a/crates/ruff_python_formatter/src/expression/parentheses.rs +++ b/crates/ruff_python_formatter/src/expression/parentheses.rs @@ -70,6 +70,10 @@ pub(crate) enum Parenthesize { /// when outer parentheses are present. IfBreaksParenthesizedNested, + /// Parenthesize the expression if it doesn't fit on a line or if the expression is + /// parenthesized in the source code. This is similar to `Self::Optional` except that this + /// variant will also include parentheses in nested calls, like + /// `Self::IfBreaksParenthesizedNested`. IfBreaksComprehension, }