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
Mypy crashed when run on the following reduced file. Setting __hash__ to None is the way to suppress Python's default hash method.
Traceback
> mypy mypy_crash.py --show-traceback
mypy_crash.py:2: error: Incompatible types in assignment (expression has type "None", base class "object" defined the type as "Callable[[object], int]")
mypy_crash.py:5: 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.820+dev.15bd486a67a3214fdb854ba2f1d6d524113da6c1
Traceback (most recent call last):
File "/home/user/.virtualenvs/mypy/bin/mypy", line 8, in <module>
sys.exit(console_entry())
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/__main__.py", line 11, in console_entry
main(None, sys.stdout, sys.stderr)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/main.py", line 98, in main
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 180, in build
sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 253, in _build
graph = dispatch(sources, manager, stdout)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 2688, in dispatch
process_graph(graph, manager)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 3012, in process_graph
process_stale_scc(graph, scc, manager)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 3119, in process_stale_scc
if not graph[id].type_check_second_pass():
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/build.py", line 2181, in type_check_second_pass
return self.type_checker().check_second_pass()
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 344, in check_second_pass
self.check_partial(node)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 356, in check_partial
self.accept(node)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 401, in accept
stmt.accept(self)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/nodes.py", line 687, in accept
return visitor.visit_func_def(self)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 726, in visit_func_def
self._visit_func_def(defn)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 737, in _visit_func_def
self.check_method_override(defn)
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 1420, in check_method_override
if self.check_method_or_accessor_override_for_base(defn, base):
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 1448, in check_method_or_accessor_override_for_base
if self.check_method_override_for_base_with_name(defn, name, base):
File "/home/user/.virtualenvs/mypy/lib/python3.6/site-packages/mypy/checker.py", line 1509, in check_method_override_for_base_with_name
assert False, str(base_attr.node)
AssertionError: Var(__hash__)
mypy_crash.py:5: : note: use --pdb to drop into pdb
Crash Report
Mypy crashed when run on the following reduced file. Setting
__hash__
toNone
is the way to suppress Python's default hash method.Traceback
To Reproduce
Contents of mypy_crash.py:
Your Environment
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: