Closed
Description
Suppose I have a.py
:
import b # type: ignore
b.foo()
and there's no b.py
or b.pyi
on the path. This checks without errors, and in incremental mode does not record b as a dependency of a.
Now I create a valid b.py
, and re-run mypy -i a.py
(this is with a warm cache). I had expected it would mark a as stale and re-parse it, but it doesn't.
A suspicious change is 4889c0c ("Warn about unused '# type: ignore' comments (#1695)") which apparently made the effect of # type: ignore
on imports much more severe, also without -i
.
(This seems related to #1904 but I think it's a separate issue. Also, I think it's low priority since it only applies to ignored top-level imports, not to imports of submodules of packages.)