Closed
Description
This is a follow-up for #6390
Assignment statements can create a bunch of different symbol nodes:
- Variable
- Type alias
- Type variable
- Named tuple
- Typed dict
Because of this current implementation is messy and has some hacks. We should refactor this to happen in two steps:
- Classify the kind of assignment
- Perform analysis accordingly for each kind
The tricky corner case is enums: c = Color['Red']
looks like a type alias, but this should create a variable.