Skip to content

Commit

Permalink
Use DisplayParseError for stdin parser errors
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jan 6, 2024
1 parent 807eb92 commit 1cffbe5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff_cli/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ pub(crate) fn lint_stdin(

let imports = imports.unwrap_or_default();

if let Some(err) = parse_error {
if let Some(error) = parse_error {
error!(
"Failed to parse {}: {err}",
path.map_or_else(|| "-".into(), fs::relativize_path).bold()
"{}",
DisplayParseError::from_source_kind(error, path.map(Path::to_path_buf), &transformed)
);
}

Expand Down

0 comments on commit 1cffbe5

Please sign in to comment.