mirror of https://github.com/astral-sh/ruff
leading_comments in block
This commit is contained in:
parent
c7666423ba
commit
fe255d1ad2
|
|
@ -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, trailing_comments};
|
||||
use crate::comments::{dangling_comments, leading_comments, trailing_comments};
|
||||
use crate::expression::parentheses::{NeedsParentheses, OptionalParentheses, Parentheses};
|
||||
use crate::expression::{CallChainLayout, has_own_parentheses};
|
||||
use crate::other::parameters::ParametersParentheses;
|
||||
|
|
@ -95,7 +95,7 @@ impl FormatNodeRule<ExprLambda> for FormatExprLambda {
|
|||
token("("),
|
||||
trailing_comments(dangling_end_of_line),
|
||||
block_indent(&format_args!(
|
||||
dangling_comments(dangling_own_line),
|
||||
leading_comments(dangling_own_line),
|
||||
body.format().with_options(Parentheses::Never)
|
||||
)),
|
||||
token(")")
|
||||
|
|
|
|||
Loading…
Reference in New Issue