Home | History | Annotate | Download | only in Lib

Lines Matching refs:_Protocol

122     invalid_generic_forms = (Generic, _Protocol)
134 arg in (Generic, _Protocol)):
620 if self.__origin__ in (Generic, _Protocol):
621 # Can't subscript Generic[...] or _Protocol[...].
833 elif cls is _Protocol:
834 # _Protocol is internal at the moment, just skip the check
847 error = Generic in cls.__bases__ and cls.__name__ != '_Protocol'
1089 """Internal metaclass for _Protocol.
1091 This exists so _Protocol classes can be generic without deriving
1096 if _Protocol not in self.__bases__:
1105 if self is _Protocol:
1121 if getattr(c, '_is_protocol', False) and c.__name__ != '_Protocol':
1156 class _Protocol(Generic, metaclass=_ProtocolMeta):
1276 class SupportsInt(_Protocol):
1284 class SupportsFloat(_Protocol):
1292 class SupportsComplex(_Protocol):
1300 class SupportsBytes(_Protocol):
1308 class SupportsAbs(_Protocol[T_co]):
1316 class SupportsRound(_Protocol[T_co]):