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
On HomeAssistant project, a complex flow is generating an INTERNAL ERROR when trying to add type hints. home-assistant/core#59503
I was able to reproduce the issue with a trimmed version of the code (see below).
Traceback
internal_error.py:36: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.920+dev.053a1beb94ee4e5b3260725594315d1b6776e42f
Traceback (most recent call last):
File "/usr/local/bin/mypy", line 8, in <module>
sys.exit(console_entry())
File "/usr/local/lib/python3.8/dist-packages/mypy/__main__.py", line 11, in console_entry
main(None, sys.stdout, sys.stderr)
File "/usr/local/lib/python3.8/dist-packages/mypy/main.py", line 92, in main
res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
File "/usr/local/lib/python3.8/dist-packages/mypy/main.py", line 170, in run_build
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 180, in build
result = _build(
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 256, in _build
graph = dispatch(sources, manager, stdout)
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 2712, in dispatch
process_graph(graph, manager)
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 3043, in process_graph
process_stale_scc(graph, scc, manager)
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 3150, in process_stale_scc
if not graph[id].type_check_second_pass():
File "/usr/local/lib/python3.8/dist-packages/mypy/build.py", line 2197, in type_check_second_pass
return self.type_checker().check_second_pass()
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 366, in check_second_pass
self.check_partial(node)
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 377, in check_partial
self.accept(node)
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 422, in accept
stmt.accept(self)
File "/usr/local/lib/python3.8/dist-packages/mypy/nodes.py", line 727, in accept
return visitor.visit_func_def(self)
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 754, in visit_func_def
self._visit_func_def(defn)
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 765, in _visit_func_def
self.check_method_override(defn)
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 1451, in check_method_override
if self.check_method_or_accessor_override_for_base(defn, base):
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 1479, in check_method_or_accessor_override_for_base
if self.check_method_override_for_base_with_name(defn, name, base):
File "/usr/local/lib/python3.8/dist-packages/mypy/checker.py", line 1540, in check_method_override_for_base_with_name
assert False, str(base_attr.node)
AssertionError: Var(async_specific)
internal_error.py:36: : note: use --pdb to drop into pdb
Crash Report
On HomeAssistant project, a complex flow is generating an INTERNAL ERROR when trying to add type hints.
home-assistant/core#59503
I was able to reproduce the issue with a trimmed version of the code (see below).
Traceback
To Reproduce
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: