Use `relativize_path` for `noqa` warnings (#5867)

Refs https://github.com/astral-sh/ruff/pull/5856
This commit is contained in:
Nikita Sobolev 2023-07-18 19:44:32 +03:00 committed by GitHub
parent 68097e34e6
commit cdfed3d50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)) => {