ruff_db: move ParseDiagnostic to old submodule too

This should have been with the previous two commits, but I missed it.
This commit is contained in:
Andrew Gallant 2025-03-03 08:32:56 -05:00 committed by Andrew Gallant
parent b2e90c3f5c
commit 80be0a0115
4 changed files with 37 additions and 37 deletions

View file

@ -9,7 +9,7 @@ pub use metadata::{ProjectDiscoveryError, ProjectMetadata};
use red_knot_python_semantic::lint::{LintRegistry, LintRegistryBuilder, RuleSelection};
use red_knot_python_semantic::register_lints;
use red_knot_python_semantic::types::check_types;
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, ParseDiagnostic, Severity, Span};
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, OldParseDiagnostic, Severity, Span};
use ruff_db::files::File;
use ruff_db::parsed::parsed_module;
use ruff_db::source::{source_text, SourceTextError};
@ -414,7 +414,7 @@ fn check_file_impl(db: &dyn Db, file: File) -> Vec<Box<dyn OldDiagnosticTrait>>
let parsed = parsed_module(db.upcast(), file);
diagnostics.extend(parsed.errors().iter().map(|error| {
let diagnostic: Box<dyn OldDiagnosticTrait> =
Box::new(ParseDiagnostic::new(file, error.clone()));
Box::new(OldParseDiagnostic::new(file, error.clone()));
diagnostic
}));