@@ -112,7 +112,7 @@ def run(
112112 source = source or ast .unparse (stmt )
113113 state = State (
114114 self ,
115- source = SourceInfo .from_ast (stmt , lineno_offset , col_offset ),
115+ source = SourceInfo .from_ast (stmt , lineno_offset , col_offset , file ),
116116 file = file ,
117117 lines = source .splitlines (),
118118 lineno_offset = lineno_offset ,
@@ -156,7 +156,7 @@ def lower_global(self, state: State[ast.AST], node: ast.AST) -> LoweringABC.Resu
156156 def visit (self , state : State [ast .AST ], node : ast .AST ) -> Result :
157157 if hasattr (node , "lineno" ):
158158 state .source = SourceInfo .from_ast (
159- node , state .lineno_offset , state .col_offset
159+ node , state .lineno_offset , state .col_offset , state . file
160160 )
161161 name = node .__class__ .__name__
162162 if name in self .registry .ast_table :
@@ -169,7 +169,7 @@ def generic_visit(self, state: State[ast.AST], node: ast.AST) -> Result:
169169 def visit_Call (self , state : State [ast .AST ], node : ast .Call ) -> Result :
170170 if hasattr (node .func , "lineno" ):
171171 state .source = SourceInfo .from_ast (
172- node .func , state .lineno_offset , state .col_offset
172+ node .func , state .lineno_offset , state .col_offset , state . file
173173 )
174174
175175 global_callee_result = state .get_global (node .func , no_raise = True )
0 commit comments