mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-01 01:12:20 +00:00
Rename Comments methods (#6649)
This commit is contained in:
parent
3ceb6fbeb0
commit
0cea4975fc
44 changed files with 128 additions and 172 deletions
|
@ -49,7 +49,7 @@ where
|
|||
fn fmt(&self, node: &N, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
let comments = f.context().comments().clone();
|
||||
|
||||
let node_comments = comments.leading_dangling_trailing_comments(node.as_any_node_ref());
|
||||
let node_comments = comments.leading_dangling_trailing(node.as_any_node_ref());
|
||||
|
||||
if self.is_suppressed(node_comments.trailing, f.context()) {
|
||||
suppressed_node(node.as_any_node_ref()).fmt(f)
|
||||
|
@ -161,7 +161,7 @@ pub fn format_node<'a>(
|
|||
formatted
|
||||
.context()
|
||||
.comments()
|
||||
.assert_formatted_all_comments(SourceCode::new(source));
|
||||
.assert_all_formatted(SourceCode::new(source));
|
||||
Ok(formatted)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue