@@ -304,9 +304,7 @@ class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
304
304
@abstractmethod
305
305
def __len__ (self ) -> int : ...
306
306
307
- _Collection = Collection [_T_co ]
308
-
309
- class Sequence (_Collection [_T_co ], Reversible [_T_co ], Generic [_T_co ]):
307
+ class Sequence (Collection [_T_co ], Reversible [_T_co ], Generic [_T_co ]):
310
308
@overload
311
309
@abstractmethod
312
310
def __getitem__ (self , i : int ) -> _T_co : ...
@@ -350,7 +348,7 @@ class MutableSequence(Sequence[_T], Generic[_T]):
350
348
def remove (self , value : _T ) -> None : ...
351
349
def __iadd__ (self , x : Iterable [_T ]) -> MutableSequence [_T ]: ...
352
350
353
- class AbstractSet (_Collection [_T_co ], Generic [_T_co ]):
351
+ class AbstractSet (Collection [_T_co ], Generic [_T_co ]):
354
352
@abstractmethod
355
353
def __contains__ (self , x : object ) -> bool : ...
356
354
# Mixin methods
@@ -433,7 +431,7 @@ class AsyncContextManager(Protocol[_T_co]):
433
431
self , __exc_type : Type [BaseException ] | None , __exc_value : BaseException | None , __traceback : TracebackType | None
434
432
) -> Awaitable [bool | None ]: ...
435
433
436
- class Mapping (_Collection [_KT ], Generic [_KT , _VT_co ]):
434
+ class Mapping (Collection [_KT ], Generic [_KT , _VT_co ]):
437
435
# TODO: We wish the key type could also be covariant, but that doesn't work,
438
436
# see discussion in https://github.com/python/typing/pull/273.
439
437
@abstractmethod
0 commit comments