-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
priority-1-normalrefactoringChanging mypy's internalsChanging mypy's internalssemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysis
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.
Metadata
Metadata
Assignees
Labels
priority-1-normalrefactoringChanging mypy's internalsChanging mypy's internalssemantic-analyzerProblems that happen during semantic analysisProblems that happen during semantic analysis