Skip to content

Commit 34f19b1

Browse files
committed
Replace CommentRanges based builder with Tokens based builder, some refactoring
1 parent 4cc6d61 commit 34f19b1

File tree

2 files changed

+272
-187
lines changed

2 files changed

+272
-187
lines changed

crates/ruff_linter/src/linter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub fn check_path(
140140
let comment_ranges = indexer.comment_ranges();
141141

142142
// Gather all ruff:directive suppressions
143-
let _suppressions = Suppressions::load(locator.contents(), comment_ranges);
143+
let _suppressions = Suppressions::from_tokens(locator.contents(), tokens);
144144

145145
// Collect doc lines. This requires a rare mix of tokens (for comments) and AST
146146
// (for docstrings), which demands special-casing at this level.

0 commit comments

Comments
 (0)