NamedTuple with dependent default values causes unexpected 'Name is not defined' errors #8178
Labels
false-positive
mypy gave an error on correct code
needs discussion
priority-1-normal
topic-named-tuple
Hi there,
When there is a
NamedTuple
with a default value that depends on one or more other default values, followed by a default value that should resolve into a NameError, all preceding default values get theName <variable> is not defined
error as well.E.g.
Causes:
If I comment out line 6, I do, however, get the expected result.
This was tried on version 0.760.
The text was updated successfully, but these errors were encountered: