@@ -1007,7 +1007,7 @@ def __new__(cls, name, bases, namespace,
1007
1007
", " .join (str (g ) for g in gvars )))
1008
1008
tvars = gvars
1009
1009
1010
- if extra and extra not in bases and extra . __module__ != 'builtins' :
1010
+ if extra and extra not in bases :
1011
1011
bases = (extra ,) + bases
1012
1012
self = super ().__new__ (cls , name , bases , namespace , _root = True )
1013
1013
self .__parameters__ = tvars
@@ -1542,7 +1542,7 @@ class ByteString(Sequence[int], extra=collections_abc.ByteString):
1542
1542
ByteString .register (type (memoryview (b'' )))
1543
1543
1544
1544
1545
- class List (list , MutableSequence [T ], extra = list ):
1545
+ class List (MutableSequence [T ], extra = list ):
1546
1546
1547
1547
def __new__ (cls , * args , ** kwds ):
1548
1548
if _geqv (cls , List ):
@@ -1551,7 +1551,7 @@ def __new__(cls, *args, **kwds):
1551
1551
return list .__new__ (cls , * args , ** kwds )
1552
1552
1553
1553
1554
- class Set (set , MutableSet [T ], extra = set ):
1554
+ class Set (MutableSet [T ], extra = set ):
1555
1555
1556
1556
def __new__ (cls , * args , ** kwds ):
1557
1557
if _geqv (cls , Set ):
@@ -1560,7 +1560,7 @@ def __new__(cls, *args, **kwds):
1560
1560
return set .__new__ (cls , * args , ** kwds )
1561
1561
1562
1562
1563
- class FrozenSet (frozenset , AbstractSet [T_co ], extra = frozenset ):
1563
+ class FrozenSet (AbstractSet [T_co ], extra = frozenset ):
1564
1564
__slots__ = ()
1565
1565
1566
1566
def __new__ (cls , * args , ** kwds ):
@@ -1596,16 +1596,15 @@ class ContextManager(Generic[T_co], extra=contextlib.AbstractContextManager):
1596
1596
__all__ .append ('ContextManager' )
1597
1597
1598
1598
1599
- class Dict (dict , MutableMapping [KT , VT ], extra = dict ):
1599
+ class Dict (MutableMapping [KT , VT ], extra = dict ):
1600
1600
1601
1601
def __new__ (cls , * args , ** kwds ):
1602
1602
if _geqv (cls , Dict ):
1603
1603
raise TypeError ("Type Dict cannot be instantiated; "
1604
1604
"use dict() instead" )
1605
1605
return dict .__new__ (cls , * args , ** kwds )
1606
1606
1607
- class DefaultDict (collections .defaultdict , MutableMapping [KT , VT ],
1608
- extra = collections .defaultdict ):
1607
+ class DefaultDict (MutableMapping [KT , VT ], extra = collections .defaultdict ):
1609
1608
1610
1609
def __new__ (cls , * args , ** kwds ):
1611
1610
if _geqv (cls , DefaultDict ):
0 commit comments