Skip to content

[red-knot] annotated assignments without RHS in stubs should still be bindings #16264

@carljm

Description

@carljm

Description

Otherwise, we get into trouble when a special form (say Protocol) is used within the global scope of the same stub file where it is defined, because that's just a local use, which only respects bindings.

This doesn't affect special forms that are used in annotation position (e.g. ClassVar) because all annotation expressions are lazy in stub files, meaning they use the public type.

Metadata

Metadata

Assignees

Labels

tyMulti-file analysis & type inference

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions