Description
I'm recording an idea so that I won't lose track of it. It's possible be that this is how dmypy already works.
Assume that module a
imports b
and we are using dmypy. Assume that a
is much larger than b
(it could be many modules). Now we modify b
so that the public interface doesn't change. We could consider a
dirty and process it to ensure that there won't be any references to the old version of b
in the in-memory cache. This would be expensive, however. An alternative would be to not process a
but to just drop the module from the in-memory cache (while retaining the JSON cache file). This way any sequence of internal modifications to b
would be very fast as they'd only require processing b
.
@gvanrossum Please close this if this is how dmypy already works (or if this is a bad idea).