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
When you try running mypy in incremental mode with Python 2, you get a spurious error in the second run (note that I update the timestamp of parent/b.py to force mypy to recheck that file):
That's amazing. The one difference between py2 and py3 that might matter
here is that the cycle of modules dependent on "builtins" differs between
versions. I guess running `mypy -v` might give some insight, if you haven't
tried that already. Also, I'd be interested to see what's in the metadata
for various files after the first run, and whether there's a difference in
the metadata between py2 and py runs.
Finally, one more difference would be absolute vs. relative import -- py2
defaults to relative import. But all your imports would seem to be
unambiguous.
I cannot repro this any more. According to git bisect it was fixed on August 18 by revision 95a0186, "Make incremental not propagate staleness if the public interface of a module is unchanged (v2) (#2014)". That's good enough for me!
I recently ran into a bug that manifests when running Python 2 with incremental mode. Here is the shortest repro I was able to create so far:
File structure
parent/a.py
parent/b.py
parent/subfolder/child_a/
__init__.py
parent/subfolder/child_a/c.py
parent/subfolder/child_b/d.py
e.py
All of the other
__init__.py
files are empty.When you try running mypy in incremental mode with Python 2, you get a spurious error in the second run (note that I update the timestamp of
parent/b.py
to force mypy to recheck that file):However, mypy works as expected when running in Python 3 mode. I'm not entirely sure why that is.
I'm planning on continuing to try and make a shorter/more enlightening repro, but I figured I should file an issue now to get this on the record.
The text was updated successfully, but these errors were encountered: