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
Sometimes UnboundType leaks to type checking, this is not good because it can lead to crashes like this:
File ".../mypy/subtypes.py", line 814, in <listcomp>
if (not (is_proper_subtype(erase_type(item), erased_s) or
File ".../mypy/erasetype.py", line 25, in erase_type
return typ.accept(EraseTypeVisitor())
File ".../mypy/types.py", line 194, in accept
return visitor.visit_unbound_type(self)
File ".../mypy/erasetype.py", line 31, in visit_unbound_type
assert False, 'Not supported'
AssertionError: Not supported
It would be better to replace all UnboundTypes with Any (after an error is reported).
Activity
Remove an assert triggered by UnboundType leaking from semanal.py (#5258
ilevkivskyi commentedon Jun 21, 2018
Update: this doesn't crash anymore, but we still to avoid leaking
UnboundTypes.Fix invalid type causing namedtuple errors in wrong files
Fix invalid type causing namedtuple errors in wrong files
Fix invalid type causing namedtuple errors in wrong files (#8549)
Support ParamSpec variables in type aliases (#14159)