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
But at runtime, they aren't subtypes (eg. using type, isinstance or mro), and they have some differences that would not be allowed if they were subtypes.
Yes, that is true. But all static type checkers treat them this way and PEP 484 isn't going to change on this point. If anything, this makes even more of a case for linting here, since it alerts users to a mismatch between their expectations of how int float subtyping works and the reality of PEP 484.
As
float
is a subtype ofint
(for type checking purposes),int
is redundant. There might be other constellations that are worth checking.The text was updated successfully, but these errors were encountered: