You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix daemon false positives related to module-level __getattr__ (#16292)
In some cases, mypy daemon could generate false positives about imports
targeting packages with a module-level `__getattr__` methods. The root
cause was that the `mypy.build.in_partial_package` function would leave
a partially initialized module in the `modules` dictionary of
`BuildManager`, which could probably cause all sorts of confusion. I
fixed this by making sure that ASTs related to temporary `State` objects
don't get persisted.
Also updated a test case to properly delete a package -- an empty
directory is now actually a valid namespace package, so to delete a
package we should delete the directory, not just the files inside it.
0 commit comments