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
I can easily see this situation inside checker.py:get_isinstance_type() by verifying that len(type.items()[0].ret_type.args) == 0; but is it the right place to message about type validation problems?
The text was updated successfully, but these errors were encountered:
Maybe the right place is in visit_call_expr in checkexpr.py? If the name of function called is builtins.isinstance or builtins.issubclass and there is, for example, any CallableType argument with .is_class_obj() returning True and having type arguments, then you issue a warning.
As @ilevkivskyi commented (#3005 (comment)), it would be nice to fail type check on this code:
because it fails in runtime with
TypeError
.I can easily see this situation inside
checker.py:get_isinstance_type()
by verifying thatlen(type.items()[0].ret_type.args) == 0
; but is it the right place to message about type validation problems?The text was updated successfully, but these errors were encountered: