You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/src/core/python_arch_eval.rs
+42-35Lines changed: 42 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ use std::cell::RefCell;
4
4
use std::{u32, vec};
5
5
6
6
use ruff_text_size::{Ranged,TextRange,TextSize};
7
-
use ruff_python_ast::{Alias,AnyRootNodeRef,Expr,ExprNamed,FStringPart,Identifier,Stmt,StmtAnnAssign,StmtAssign,StmtClassDef,StmtExpr,StmtFor,StmtFunctionDef,StmtIf,StmtReturn,StmtTry,StmtWhile,StmtWith};
7
+
use ruff_python_ast::{Alias,AnyRootNodeRef,Expr,ExprNamed,FStringPart,Identifier,NodeIndex,Stmt,StmtAnnAssign,StmtAssign,StmtClassDef,StmtExpr,StmtFor,StmtFunctionDef,StmtIf,StmtReturn,StmtTry,StmtWhile,StmtWith};
8
8
use lsp_types::{Diagnostic,Position,Range};
9
9
use tracing::{debug, trace, warn};
10
10
@@ -102,18 +102,23 @@ impl PythonArchEval {
102
102
(file_info_ast_bw.get_stmts().unwrap(),None)
103
103
},
104
104
false => {
105
-
let func_stmt = file_info_ast_bw.indexed_module.as_ref().unwrap().get_by_index(self.sym_stack[0].borrow().node_index().unwrap().load());
context.insert(S!("default"),ContextValue::BOOLEAN(true));//set to True as the value is not really useful for now, but we want the key in context if one default is set
1058
+
result_context.insert(S!("default"),ContextValue::BOOLEAN(true));//set to True as the value is not really useful for now, but we want the key in context if one default is set
Copy file name to clipboardExpand all lines: server/src/core/python_validator.rs
+20-17Lines changed: 20 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
use ruff_python_ast::{Alias,AnyRootNodeRef,Expr,Identifier,Stmt,StmtAnnAssign,StmtAssert,StmtAssign,StmtAugAssign,StmtClassDef,StmtMatch,StmtRaise,StmtTry,StmtTypeAlias,StmtWith};
1
+
use ruff_python_ast::{Alias,AnyRootNodeRef,Expr,Identifier,NodeIndex,Stmt,StmtAnnAssign,StmtAssert,StmtAssign,StmtAugAssign,StmtClassDef,StmtMatch,StmtRaise,StmtTry,StmtTypeAlias,StmtWith};
2
2
use ruff_text_size::{Ranged,TextRange,TextSize};
3
3
use tracing::{trace, warn};
4
4
use std::rc::Rc;
@@ -154,22 +154,25 @@ impl PythonValidator {
154
154
let file_info = file_info_rc.borrow();
155
155
if file_info.file_info_ast.borrow().indexed_module.is_some(){
156
156
let file_info_ast = file_info.file_info_ast.borrow();
157
-
let stmt = file_info_ast.indexed_module.as_ref().unwrap().get_by_index(self.sym_stack[0].borrow().node_index().unwrap().load());
0 commit comments