New semantic analyzer: Refactor handling of is_inferred_def & co #6458
Labels
priority-1-normal
refactoring
Changing mypy's internals
semantic-analyzer
Problems that happen during semantic analysis
There are several things that hold information about whether a type of variable should be inferred or not:
RefExpr.is_new_def
RefExpr.is_inferred_def
Var.is_ready
Var.is_inferred
TypeChecker.is_definition()
Such a variety of things is partially caused by the fact that special definitions like named tuples etc. used to have a
Var()
to which thelvalue
was pointing. With the new analyzer we don't have this, so it would be good to clean-up/refactor the logic around inference after we merge the two analyzers.See also #6453
The text was updated successfully, but these errors were encountered: