From b0c31d0c59d79772ea37471485007665c814e864 Mon Sep 17 00:00:00 2001 From: Aria Desires Date: Tue, 2 Dec 2025 14:39:24 -0500 Subject: [PATCH] leave some TODOs --- crates/ty_python_semantic/src/types/infer/builder.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/ty_python_semantic/src/types/infer/builder.rs b/crates/ty_python_semantic/src/types/infer/builder.rs index f5870c9b08..fd56870f28 100644 --- a/crates/ty_python_semantic/src/types/infer/builder.rs +++ b/crates/ty_python_semantic/src/types/infer/builder.rs @@ -6507,6 +6507,10 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> { if symbol.is_bound() || symbol.is_declared() { // This name is explicitly defined in the global scope (not just in function // bodies that mark it `global`). + // + // TODO: call `self.store_expression_type(name)` here with the computed type of + // the variable (requires `infer_load_name` but for `Identifier`). This would + // empower displaying the type on-hover in the LSP. continue; } } @@ -6588,6 +6592,10 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> { // but it's ok if it's `nonlocal`. If a "chain" of `nonlocal` statements fails to // lead to a valid binding, the outermost one will be an error; we don't need to // walk the whole chain for each one. + // + // TODO: call `self.store_expression_type(name)` here with the computed type of + // the variable (requires `infer_load_name` but for `Identifier`). This would + // empower displaying the type on-hover in the LSP. continue 'names; } // There's no matching binding in an enclosing scope. This `nonlocal` statement is