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
{{ message }}
Repository navigation
issubclass() doesn't narrow down types of type variables #7920
Looks like an issue in checker.py (the logic around issubclass() is pretty ad-hoc there). One needs to add an elif for type variables in find_isinstance_check() there.
This might potentially need also an adjustment in meet.py either in narrow_declared_type() or in is_overlapping_types() or in meet_types().
Activity
ilevkivskyi commentedon Nov 11, 2019
Looks like an issue in
checker.py(the logic aroundissubclass()is pretty ad-hoc there). One needs to add aneliffor type variables infind_isinstance_check()there.This might potentially need also an adjustment in
meet.pyeither innarrow_declared_type()or inis_overlapping_types()or inmeet_types().TH3CHARLie commentedon Nov 11, 2019
@ilevkivskyi I'd like to take this
ilevkivskyi commentedon Nov 11, 2019
OK, go ahead.
Fix `issubclass()` to narrow down types of type variables (#7930)