@@ -1513,6 +1513,7 @@ def new_user(user_class: Type[U]) -> U:
1513
1513
1514
1514
@runtime_checkable
1515
1515
class SupportsInt (Protocol ):
1516
+ """An ABC with one abstract method __int__."""
1516
1517
__slots__ = ()
1517
1518
1518
1519
@abstractmethod
@@ -1522,6 +1523,7 @@ def __int__(self) -> int:
1522
1523
1523
1524
@runtime_checkable
1524
1525
class SupportsFloat (Protocol ):
1526
+ """An ABC with one abstract method __float__."""
1525
1527
__slots__ = ()
1526
1528
1527
1529
@abstractmethod
@@ -1531,6 +1533,7 @@ def __float__(self) -> float:
1531
1533
1532
1534
@runtime_checkable
1533
1535
class SupportsComplex (Protocol ):
1536
+ """An ABC with one abstract method __complex__."""
1534
1537
__slots__ = ()
1535
1538
1536
1539
@abstractmethod
@@ -1540,6 +1543,7 @@ def __complex__(self) -> complex:
1540
1543
1541
1544
@runtime_checkable
1542
1545
class SupportsBytes (Protocol ):
1546
+ """An ABC with one abstract method __bytes__."""
1543
1547
__slots__ = ()
1544
1548
1545
1549
@abstractmethod
@@ -1549,6 +1553,7 @@ def __bytes__(self) -> bytes:
1549
1553
1550
1554
@runtime_checkable
1551
1555
class SupportsIndex (Protocol ):
1556
+ """An ABC with one abstract method __index__."""
1552
1557
__slots__ = ()
1553
1558
1554
1559
@abstractmethod
@@ -1558,6 +1563,7 @@ def __index__(self) -> int:
1558
1563
1559
1564
@runtime_checkable
1560
1565
class SupportsAbs (Protocol [T_co ]):
1566
+ """An ABC with one abstract method __abs__ that is covariant in its return type."""
1561
1567
__slots__ = ()
1562
1568
1563
1569
@abstractmethod
@@ -1567,6 +1573,7 @@ def __abs__(self) -> T_co:
1567
1573
1568
1574
@runtime_checkable
1569
1575
class SupportsRound (Protocol [T_co ]):
1576
+ """An ABC with one abstract method __round__ that is covariant in its return type."""
1570
1577
__slots__ = ()
1571
1578
1572
1579
@abstractmethod
0 commit comments