C:\Users\Levitanus>mypy --show-traceback E:\packages\pyksp\pyksp\new_base_types.py E:\packages\pyksp\pyksp\new_base_types.py:1: error: Invalid type "self" E:\packages\pyksp\pyksp\new_base_types.py:221: error: Argument 1 of "__eq__" incompatible with supertype "object" E:\packages\pyksp\pyksp\new_base_types.py:221: error: Return type of "__eq__" incompatible with supertype "object" E:\packages\pyksp\pyksp\new_base_types.py:222: error: Cannot instantiate abstract class 'AstEq' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:225: error: Argument 1 of "__ne__" incompatible with supertype "object" E:\packages\pyksp\pyksp\new_base_types.py:225: error: Return type of "__ne__" incompatible with supertype "object" E:\packages\pyksp\pyksp\new_base_types.py:226: error: Cannot instantiate abstract class 'AstNe' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:230: error: Cannot instantiate abstract class 'AstLt' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:234: error: Cannot instantiate abstract class 'AstGt' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:238: error: Cannot instantiate abstract class 'AstLe' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:242: error: Cannot instantiate abstract class 'AstGe' with abstract attribute 'get_value' E:\packages\pyksp\pyksp\new_base_types.py:351: error: Name 'AstNot' already defined on line 343 E:\packages\pyksp\pyksp\new_base_types.py:283: error: INTERNAL ERROR -- please report a bug at https://github.com/python/mypy/issues version: 0.620 Traceback (most recent call last): File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Levitanus\AppData\Local\Programs\Python\Python37-32\Scripts\mypy.exe\__main__.py", line 9, in sys.exit(console_entry()) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\__main__.py", line 7, in console_entry main(None) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\main.py", line 91, in main res = type_check_only(sources, bin_dir, options, flush_errors, fscache) # noqa File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\main.py", line 148, in type_check_only fscache=fscache) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 177, in build flush_errors, fscache) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 350, in _build graph = dispatch(sources, manager) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 2560, in dispatch process_graph(graph, manager) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 2853, in process_graph process_stale_scc(graph, scc, manager) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 2976, in process_stale_scc graph[id].type_check_first_pass() File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\build.py", line 2151, in type_check_first_pass self.type_checker().check_first_pass() File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 253, in check_first_pass self.accept(d) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 352, in accept stmt.accept(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\nodes.py", line 808, in accept return visitor.visit_class_def(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1368, in visit_class_def self.accept(defn.defs) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 352, in accept stmt.accept(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\nodes.py", line 873, in accept return visitor.visit_block(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1514, in visit_block self.accept(s) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 352, in accept stmt.accept(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\nodes.py", line 591, in accept return visitor.visit_func_def(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 663, in visit_func_def self._visit_func_def(defn) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 667, in _visit_func_def self.check_func_item(defn, name=defn.name()) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 729, in check_func_item self.check_func_def(defn, typ, name) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 895, in check_func_def self.accept(item.body) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 352, in accept stmt.accept(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\nodes.py", line 873, in accept return visitor.visit_block(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1514, in visit_block self.accept(s) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 352, in accept stmt.accept(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\nodes.py", line 921, in accept return visitor.visit_assignment_stmt(self) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1521, in visit_assignment_stmt self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None, s.new_syntax) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1570, in check_assignment if self.check_compatibility_all_supers(lvalue, lvalue_type, rvalue): File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1662, in check_compatibility_all_supers base_type, base_node = self.lvalue_type_from_base(lvalue_node, base) File "c:\users\levitanus\appdata\local\programs\python\python37-32\lib\site-packages\mypy\checker.py", line 1749, in lvalue_type_from_base assert self_type is not None, "Internal error: base lookup outside class" AssertionError: Internal error: base lookup outside class E:\packages\pyksp\pyksp\new_base_types.py:283: : note: use --pdb to drop into pdb