Join GitHub today
Make `refresh_top_level()` more like `visit_file()` in the third pass #6098
Fixes #6032 (first part)
This is a very straightforward fix. I am actually surprised no one found this before (maybe because mypy daemon is not so widely used yet).
In future, it would be great to have a mechanism to avoid such mistakes, by somehow making
JukkaL left a comment
Looks good! Hopefully this code will be cleaned up as part of the semantic analyzer redesign. My only suggestion is to split this into two separate PRs. Feel free to merge the second PR once builds are green without further review.