mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Add API to emit type-checking diagnostics (#12988)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
38c19fb96e
commit
c65e3310d5
12 changed files with 337 additions and 142 deletions
|
@ -254,6 +254,12 @@ impl Debug for SourceLocation {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for SourceLocation {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{row}:{column}", row = self.row, column = self.column)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub enum SourceRow {
|
||||
/// A row within a cell in a Jupyter Notebook.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue