Open DetachHead opened 8 months ago
I'm not sure what you are expecting sorry. if you split the assgnments then basedmypy behaves the same as mypy
if assigning an Any
to a variable that takes a str
causes the variable to remain typed as a str
, why does assigning an Any | str
to a variable that takes a str
change its type to Any | str
?
it's an upstream defect that has been exposed via initial assignment.
this does not happen in upstreamed mypy
Gist to reproduce