@@ -30,17 +30,15 @@ use ruff_python_ast::{
3030 PatternMatchStar , PatternMatchValue , Singleton , Stmt , StmtExpr , TypeParam , TypeParamParamSpec ,
3131 TypeParamTypeVar , TypeParamTypeVarTuple , TypeParams , UnaryOp , WithItem ,
3232} ;
33- use ruff_source_file:: { OneIndexed , SourceFile } ;
3433use ruff_text_size:: { Ranged , TextRange } ;
35- use rustpython_wtf8:: Wtf8Buf ;
36- // use rustpython_ast::located::{self as located_ast, Located};
3734use rustpython_compiler_core:: {
38- Mode ,
35+ Mode , OneIndexed , SourceFile , SourceLocation ,
3936 bytecode:: {
4037 self , Arg as OpArgMarker , BinaryOperator , CodeObject , ComparisonOperator , ConstantData ,
4138 Instruction , OpArg , OpArgType , UnpackExArgs ,
4239 } ,
4340} ;
41+ use rustpython_wtf8:: Wtf8Buf ;
4442use std:: borrow:: Cow ;
4543
4644const MAXBLOCKS : usize = 20 ;
@@ -631,7 +629,7 @@ impl Compiler {
631629 lineno : u32 ,
632630 ) -> CompileResult < ( ) > {
633631 // Create location
634- let location = ruff_source_file :: SourceLocation {
632+ let location = SourceLocation {
635633 row : OneIndexed :: new ( lineno as usize ) . unwrap_or ( OneIndexed :: MIN ) ,
636634 column : OneIndexed :: new ( 1 ) . unwrap ( ) ,
637635 } ;
@@ -769,7 +767,7 @@ impl Compiler {
769767 // Emit RESUME instruction
770768 let _resume_loc = if scope_type == CompilerScope :: Module {
771769 // Module scope starts with lineno 0
772- ruff_source_file :: SourceLocation {
770+ SourceLocation {
773771 row : OneIndexed :: MIN ,
774772 column : OneIndexed :: MIN ,
775773 }
@@ -5842,7 +5840,7 @@ mod ruff_tests {
58425840#[ cfg( test) ]
58435841mod tests {
58445842 use super :: * ;
5845- use ruff_source_file :: SourceFileBuilder ;
5843+ use rustpython_compiler_core :: SourceFileBuilder ;
58465844
58475845 fn compile_exec ( source : & str ) -> CodeObject {
58485846 let opts = CompileOpts :: default ( ) ;
0 commit comments