From 61f11195fb2d53179ef90987fa78ee5ab6ce1bed Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 11 Dec 2025 18:59:07 +0100 Subject: [PATCH] Comment --- crates/ty_python_semantic/src/semantic_model.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ty_python_semantic/src/semantic_model.rs b/crates/ty_python_semantic/src/semantic_model.rs index b14b269e5f..879bb48697 100644 --- a/crates/ty_python_semantic/src/semantic_model.rs +++ b/crates/ty_python_semantic/src/semantic_model.rs @@ -241,6 +241,8 @@ impl<'db> SemanticModel<'db> { let index = semantic_index(self.db, self.file); match self.node_in_ast(node) { ast::AnyNodeRef::Identifier(identifier) => index.try_expression_scope_id(identifier), + + // Nodes implementing `HasDefinition` ast::AnyNodeRef::StmtFunctionDef(function) => Some( function .definition(self) @@ -271,6 +273,8 @@ impl<'db> SemanticModel<'db> { ast::AnyNodeRef::TypeParamTypeVar(var) => { Some(var.definition(self).scope(self.db).file_scope_id(self.db)) } + + // Fallback node => match node.as_expr_ref() { // If we couldn't identify a specific // expression that we're in, then just