-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid extra newline between diagnostics in grouped mode (#4776)
- Loading branch information
1 parent
2cde2ef
commit c8166f2
Showing
4 changed files
with
49 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
crates/ruff/src/message/snapshots/ruff__message__grouped__tests__show_source.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
source: crates/ruff/src/message/grouped.rs | ||
expression: content | ||
--- | ||
fib.py: | ||
1:8 F401 `os` imported but unused | ||
| | ||
1 | import os | ||
| ^^ F401 | ||
| | ||
= help: Remove unused import: `os` | ||
|
||
6:5 F841 Local variable `x` is assigned to but never used | ||
| | ||
6 | def fibonacci(n): | ||
7 | """Compute the nth number in the Fibonacci sequence.""" | ||
8 | x = 1 | ||
| ^ F841 | ||
9 | if n == 0: | ||
10 | return 0 | ||
| | ||
= help: Remove assignment to unused variable `x` | ||
|
||
undef.py: | ||
1:4 F821 Undefined name `a` | ||
| | ||
1 | if a == 1: pass | ||
| ^ F821 | ||
| | ||
|
||
|