mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
Fix: Re-add missing node start positions (#6780)
This commit is contained in:
parent
1e6d1182bf
commit
4bdd99f882
1 changed files with 7 additions and 1 deletions
|
@ -54,7 +54,13 @@ where
|
||||||
if self.is_suppressed(node_comments.trailing, f.context()) {
|
if self.is_suppressed(node_comments.trailing, f.context()) {
|
||||||
suppressed_node(node.as_any_node_ref()).fmt(f)
|
suppressed_node(node.as_any_node_ref()).fmt(f)
|
||||||
} else {
|
} else {
|
||||||
leading_comments(node_comments.leading).fmt(f)?;
|
write!(
|
||||||
|
f,
|
||||||
|
[
|
||||||
|
leading_comments(node_comments.leading),
|
||||||
|
source_position(node.start())
|
||||||
|
]
|
||||||
|
)?;
|
||||||
self.fmt_fields(node, f)?;
|
self.fmt_fields(node, f)?;
|
||||||
self.fmt_dangling_comments(node_comments.dangling, f)?;
|
self.fmt_dangling_comments(node_comments.dangling, f)?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue