Skip to content

Commit

Permalink
Use relativize_path for noqa warnings (astral-sh#5867)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored and evanrittenhouse committed Jul 19, 2023
1 parent da4d412 commit 3b29822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff/src/noqa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl FileExemption {
Err(err) => {
#[allow(deprecated)]
let line = locator.compute_line_index(range.start());
let path_display = path.display();
let path_display = relativize_path(path);
warn!("Invalid `# noqa` directive on {path_display}:{line}: {err}");
}
Ok(Some(ParsedFileExemption::All)) => {
Expand Down

0 comments on commit 3b29822

Please sign in to comment.