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
Traceback (most recent call last):
File "/home/mg/.virtualenvs/mypy/bin/mypy", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/mg/src/mypy/scripts/mypy", line 6, in <module>
main(__file__)
File "/home/mg/src/mypy/mypy/main.py", line 50, in main
type_check_only(sources, bin_dir, options)
File "/home/mg/src/mypy/mypy/main.py", line 94, in type_check_only
python_path=options.python_path)
File "/home/mg/src/mypy/mypy/build.py", line 210, in build
result = manager.process(initial_states)
File "/home/mg/src/mypy/mypy/build.py", line 425, in process
next.process()
File "/home/mg/src/mypy/mypy/build.py", line 930, in process
self.type_checker().visit_file(self.tree, self.tree.path)
File "/home/mg/src/mypy/mypy/checker.py", line 409, in visit_file
self.accept(d)
File "/home/mg/src/mypy/mypy/checker.py", line 450, in accept
typ = node.accept(self)
File "/home/mg/src/mypy/mypy/nodes.py", line 564, in accept
return visitor.visit_assignment_stmt(self)
File "/home/mg/src/mypy/mypy/checker.py", line 1122, in visit_assignment_stmt
self.check_assignment(s.lvalues[-1], s.rvalue, s.type is None)
File "/home/mg/src/mypy/mypy/checker.py", line 1167, in check_assignment
self.check_indexed_assignment(index_lvalue, rvalue, rvalue)
File "/home/mg/src/mypy/mypy/checker.py", line 1499, in check_indexed_assignment
self.try_infer_partial_type_from_indexed_assignment(lvalue, rvalue)
File "/home/mg/src/mypy/mypy/checker.py", line 1513, in try_infer_partial_type_from_indexed_assignment
if var is not None and isinstance(var.type, PartialType):
AttributeError: 'TypeInfo' object has no attribute 'type'
*** INTERNAL ERROR ***
test.py:4: error: Internal error
Testing some more, I see the same error when I remove the overloaded __getitem__ method and test with
I was testing how to make a generic Sequence with an overloaded
__getitem__
and had these input files:Running
mypy test.py
producesTesting some more, I see the same error when I remove the overloaded
__getitem__
method and test withThis is with mypy 0ec0cb4.
The text was updated successfully, but these errors were encountered: