Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42160c1

Browse files
committed
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:rust-lang/annotate-snippets-rs#169Otherwise, the snapshot diff also shows a bug fix: a `^` is now renderedwhere as it previously was not.
1 parent0b165ac commit42160c1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

‎crates/ruff_annotate_snippets/src/renderer/display_list.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,9 +1394,7 @@ fn format_body(
13941394
}
13951395
})
13961396
.sum();
1397-
if line.chars().any(|c| !c.is_whitespace()){
1398-
whitespace_margin =min(whitespace_margin, leading_whitespace);
1399-
}
1397+
whitespace_margin =min(whitespace_margin, leading_whitespace);
14001398
max_line_len =max(max_line_len, line_length);
14011399

14021400
let line_start_index = line_range.0;

‎crates/ruff_linter/src/rules/pycodestyle/snapshots/ruff_linter__rules__pycodestyle__tests__w292_4.snap‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
22
source:crates/ruff_linter/src/rules/pycodestyle/mod.rs
3-
snapshot_kind:text
43
---
54
W292_4.py:1:2:W292 [*]Nonewlineatendoffile
65
|
76
1|
8-
|W292
7+
|^W292
98
|
109
=help:Addtrailingnewline
1110

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp