-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
@runtime_checkable
class Container(Protocol[_T_co]):
# This is generic more on vibes than anything else
@abstractmethod
def __contains__(self, x: object, /) -> bool: ...
@runtime_checkable
class Container(Protocol[_T_co]):
@abstractmethod
# must implement safe variance
def __contains__(self, x: _T_co, /) -> bool: ... # type: ignore[unsafe-variance]