block indent and trailing comments

This commit is contained in:
Brent Westbrook 2025-12-05 13:22:09 -05:00
parent 25d70b408b
commit c7666423ba
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ use ruff_python_ast::{AnyNodeRef, Expr, ExprLambda};
use ruff_text_size::Ranged;
use crate::builders::parenthesize_if_expands;
use crate::comments::dangling_comments;
use crate::comments::{dangling_comments, trailing_comments};
use crate::expression::parentheses::{NeedsParentheses, OptionalParentheses, Parentheses};
use crate::expression::{CallChainLayout, has_own_parentheses};
use crate::other::parameters::ParametersParentheses;
@ -93,8 +93,8 @@ impl FormatNodeRule<ExprLambda> for FormatExprLambda {
[
space(),
token("("),
dangling_comments(dangling_end_of_line),
soft_block_indent(&format_args!(
trailing_comments(dangling_end_of_line),
block_indent(&format_args!(
dangling_comments(dangling_own_line),
body.format().with_options(Parentheses::Never)
)),