[red-knot] treat annotated assignments without RHS in stubs as bindings (#16409)

This commit is contained in:
Mike Perlov 2025-02-28 11:45:21 -05:00 committed by GitHub
parent 5ca6cc2cc8
commit fdf0915283
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 80 additions and 17 deletions

View file

@ -353,7 +353,7 @@ impl<'db> SemanticIndexBuilder<'db> {
#[allow(unsafe_code)]
// SAFETY: `definition_node` is guaranteed to be a child of `self.module`
let kind = unsafe { definition_node.into_owned(self.module.clone()) };
let category = kind.category();
let category = kind.category(self.file.is_stub(self.db.upcast()));
let is_reexported = kind.is_reexported();
let definition = Definition::new(
self.db,