-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid parsing joint rule codes as distinct codes in # noqa
- Loading branch information
1 parent
f837428
commit 464bb82
Showing
3 changed files
with
57 additions
and
3 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
23 changes: 23 additions & 0 deletions
23
crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__noqa_empty_comma.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,23 @@ | ||
--- | ||
source: crates/ruff_linter/src/noqa.rs | ||
expression: "Directive::try_extract(source, TextSize::default())" | ||
--- | ||
Ok( | ||
Some( | ||
Codes( | ||
Codes { | ||
range: 0..18, | ||
codes: [ | ||
Code { | ||
code: "F401", | ||
range: 8..12, | ||
}, | ||
Code { | ||
code: "F841", | ||
range: 14..18, | ||
}, | ||
], | ||
}, | ||
), | ||
), | ||
) |
19 changes: 19 additions & 0 deletions
19
crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__noqa_squashed_codes.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,19 @@ | ||
--- | ||
source: crates/ruff_linter/src/noqa.rs | ||
expression: "Directive::try_extract(source, TextSize::default())" | ||
--- | ||
Ok( | ||
Some( | ||
Codes( | ||
Codes { | ||
range: 0..16, | ||
codes: [ | ||
Code { | ||
code: "F401F841", | ||
range: 8..16, | ||
}, | ||
], | ||
}, | ||
), | ||
), | ||
) |