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
Mypy, pyre, and pyright all already allow protocol types to be assigned to object. Test program:
fromtypingimportProtocoldeff(x: object) ->None:
passdefg(x: int) ->None:
passclassX(Protocol):
foo: intdefh(x: X) ->None:
f(x) # OK: protocol is assignable to objectg(x) # E: protocol is not assignable to int
See #1743 (comment)
The text was updated successfully, but these errors were encountered: