mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-18 01:20:40 +00:00
Rename ruff_python_semantic's Context
struct to SemanticModel
(#4565)
This commit is contained in:
parent
3238743a7b
commit
19c4b7bee6
304 changed files with 1253 additions and 1142 deletions
|
@ -1,22 +1,25 @@
|
|||
mod generator;
|
||||
mod indexer;
|
||||
mod line_index;
|
||||
mod locator;
|
||||
mod stylist;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use crate::source_code::line_index::{LineIndex, OneIndexed};
|
||||
pub use generator::Generator;
|
||||
pub use indexer::Indexer;
|
||||
pub use locator::Locator;
|
||||
use ruff_text_size::{TextRange, TextSize};
|
||||
use rustpython_parser as parser;
|
||||
use rustpython_parser::{lexer, Mode, ParseError};
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use generator::Generator;
|
||||
pub use indexer::Indexer;
|
||||
pub use locator::Locator;
|
||||
pub use stylist::{Quote, Stylist};
|
||||
|
||||
pub use crate::source_code::line_index::{LineIndex, OneIndexed};
|
||||
|
||||
mod generator;
|
||||
mod indexer;
|
||||
mod line_index;
|
||||
mod locator;
|
||||
mod stylist;
|
||||
|
||||
/// Run round-trip source code generation on a given Python code.
|
||||
pub fn round_trip(code: &str, source_path: &str) -> Result<String, ParseError> {
|
||||
let locator = Locator::new(code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue