Closed
Description
🐛 Python 3.6.5, mypy 0.610
Reproducible on https://github.com/pypa/pip master. Running tox -e mypy
on that repo a second time or later, results in an error the second time.
mypy configuration:
[mypy]
follow_imports = silent
ignore_missing_imports = True
strict_optional = False
[mypy-pip/_vendor/*]
follow_imports = skip
ignore_errors = True
mypy output/traceback:
mypy runtests: commands[0] | mypy src/pip
Traceback (most recent call last):
File "/Users/pradyunsg/Projects/pip/.tox/mypy/bin/mypy", line 11, in <module>
sys.exit(console_entry())
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/__main__.py", line 7, in console_entry
main(None)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/main.py", line 91, in main
res = type_check_only(sources, bin_dir, options, flush_errors, fscache) # noqa
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/main.py", line 148, in type_check_only
fscache=fscache)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 185, in build
flush_errors, fscache)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 285, in _build
graph = dispatch(sources, manager)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 2398, in dispatch
process_graph(graph, manager)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 2684, in process_graph
process_fresh_modules(graph, prev_scc, manager)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 2770, in process_fresh_modules
graph[id].fix_cross_refs()
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/build.py", line 1853, in fix_cross_refs
self.options.use_fine_grained_cache)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/fixup.py", line 25, in fixup_module
node_fixer.visit_symbol_table(tree.names)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/fixup.py", line 95, in visit_symbol_table
self.visit_type_info(value.node)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/fixup.py", line 48, in visit_type_info
base.accept(self.type_fixer)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/types.py", line 512, in accept
return visitor.visit_instance(self)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/fixup.py", line 156, in visit_instance
inst.type = lookup_qualified_typeinfo(self.modules, type_ref, self.quick_and_dirty)
File "/Users/pradyunsg/Projects/pip/.tox/mypy/lib/python3.6/site-packages/mypy/fixup.py", line 246, in lookup_qualified_typeinfo
assert quick_and_dirty, "Should never get here in normal mode"
AssertionError: Should never get here in normal mode
ERROR: InvocationError for command '/Users/pradyunsg/Projects/pip/.tox/mypy/bin/mypy src/pip' (exited with code 1)