Rename ruff_python_semantic's Context struct to SemanticModel (#4565)
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
use crate::source_code::SourceLocation;
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::num::NonZeroUsize;
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::source_code::SourceLocation;
|
||||
|
||||
/// Index for fast [byte offset](TextSize) to [`SourceLocation`] conversions.
|
||||
///
|
||||
/// Cloning a [`LineIndex`] is cheap because it only requires bumping a reference count.
|
||||
@@ -312,9 +314,10 @@ const fn unwrap<T: Copy>(option: Option<T>) -> T {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruff_text_size::TextSize;
|
||||
|
||||
use crate::source_code::line_index::LineIndex;
|
||||
use crate::source_code::{OneIndexed, SourceLocation};
|
||||
use ruff_text_size::TextSize;
|
||||
|
||||
#[test]
|
||||
fn ascii_index() {
|
||||
|
||||
Reference in New Issue
Block a user