-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
I'm attempting to run mypy on an existning project, developed long before typing was a thing in python. Mypy (master) crashes with the below stack-trace. Shrinking the project is not doable,
but I can probably supply more info, if needed.
The assertion only fails when mypy.ini
contains cache_fine_grained = True
, but not otherwise.
triresolve/dw/models.py: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.770+dev.b8bdc26127d7b7f3ac42b308350b0ec0fba01fcc
Traceback (most recent call last):
File "/Users/andreasr/dev/triresolve/venv/bin/mypy", line 11, in <module>
sys.exit(console_entry())
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/__main__.py", line 8, in console_entry
main(None, sys.stdout, sys.stderr)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/main.py", line 89, in main
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 181, in build
sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 252, in _build
graph = dispatch(sources, manager, stdout)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2620, in dispatch
return dispatch(sources, manager, stdout)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2626, in dispatch
process_graph(graph, manager)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2949, in process_graph
process_stale_scc(graph, scc, manager)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 3058, in process_stale_scc
graph[id].finish_passes()
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2152, in finish_passes
free_tree(self.tree)
File "/usr/local/Cellar/[email protected]/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 1919, in wrap_context
yield
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2149, in finish_passes
self.update_fine_grained_deps(self.manager.fg_deps)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2197, in update_fine_grained_deps
merge_dependencies(self.compute_fine_grained_deps(), deps)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/build.py", line 2191, in compute_fine_grained_deps
options=self.manager.options)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 114, in get_dependencies
target.accept(visitor)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/nodes.py", line 294, in accept
return visitor.visit_mypy_file(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 176, in visit_mypy_file
super().visit_mypy_file(o)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/traverser.py", line 35, in visit_mypy_file
d.accept(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/nodes.py", line 939, in accept
return visitor.visit_class_def(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 239, in visit_class_def
super().visit_class_def(o)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/traverser.py", line 71, in visit_class_def
o.defs.accept(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/nodes.py", line 1004, in accept
return visitor.visit_block(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 351, in visit_block
super().visit_block(o)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/traverser.py", line 39, in visit_block
s.accept(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/nodes.py", line 1062, in accept
return visitor.visit_assignment_stmt(self)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 403, in visit_assignment_stmt
self.process_lvalue(lvalue)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 443, in process_lvalue
lvalue_type = self.get_non_partial_lvalue_type(lvalue)
File "/Users/andreasr/dev/triresolve/venv/lib/python3.7/site-packages/mypy/server/deps.py", line 495, in get_non_partial_lvalue_type
assert not lvalue.is_new_def
AssertionError:
Metadata
Metadata
Assignees
Labels
No labels