mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
red_knot_python_semantic: remove Ranged
impl for TypeCheckDiagnostic
It seems nothing is using it, and I'm not sure if it makes semantic sense. Particularly if we want to support multiple ranges. One could make an argument that this ought to correspond to the "primary" range (which we should have), but I think such a concept is better expressed as an explicit routine if possible.
This commit is contained in:
parent
e84985e9b3
commit
222660170c
1 changed files with 1 additions and 7 deletions
|
@ -11,7 +11,7 @@ use crate::{declare_lint, Db};
|
||||||
use ruff_db::diagnostic::{Diagnostic, DiagnosticId, Severity, Span};
|
use ruff_db::diagnostic::{Diagnostic, DiagnosticId, Severity, Span};
|
||||||
use ruff_db::files::File;
|
use ruff_db::files::File;
|
||||||
use ruff_python_ast::{self as ast, AnyNodeRef};
|
use ruff_python_ast::{self as ast, AnyNodeRef};
|
||||||
use ruff_text_size::{Ranged, TextRange};
|
use ruff_text_size::TextRange;
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::fmt::Formatter;
|
use std::fmt::Formatter;
|
||||||
|
@ -811,12 +811,6 @@ impl Diagnostic for TypeCheckDiagnostic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Ranged for TypeCheckDiagnostic {
|
|
||||||
fn range(&self) -> TextRange {
|
|
||||||
self.range
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A collection of type check diagnostics.
|
/// A collection of type check diagnostics.
|
||||||
///
|
///
|
||||||
/// The diagnostics are wrapped in an `Arc` because they need to be cloned multiple times
|
/// The diagnostics are wrapped in an `Arc` because they need to be cloned multiple times
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue