mirror of https://github.com/astral-sh/ruff
ruff_annotate_snippets: update snapshot for single ASCII whitespace source
The change to the rendering code is elaborated on in more detail here, where I attempted to upstream it: https://github.com/rust-lang/annotate-snippets-rs/pull/169 Otherwise, the snapshot diff also shows a bug fix: a `^` is now rendered where as it previously was not.
This commit is contained in:
parent
59edee2aca
commit
88df168b63
|
|
@ -1394,9 +1394,7 @@ fn format_body(
|
|||
}
|
||||
})
|
||||
.sum();
|
||||
if line.chars().any(|c| !c.is_whitespace()) {
|
||||
whitespace_margin = min(whitespace_margin, leading_whitespace);
|
||||
}
|
||||
whitespace_margin = min(whitespace_margin, leading_whitespace);
|
||||
max_line_len = max(max_line_len, line_length);
|
||||
|
||||
let line_start_index = line_range.0;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
W292_4.py:1:2: W292 [*] No newline at end of file
|
||||
|
|
||||
1 |
|
||||
| W292
|
||||
| ^ W292
|
||||
|
|
||||
= help: Add trailing newline
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue