diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-10-08 07:14:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-08 07:14:57 -0700 |
commit | 7162440a7247f77d22cd937143f358fd5ac85af4 (patch) | |
tree | 1b0307c0d7a2c44b1c91c459aa598c823cfe6a03 /Lib/typing.py | |
parent | 10b475a151dc35c8ca4047331d591130973e914d (diff) | |
download | cpython-git-7162440a7247f77d22cd937143f358fd5ac85af4.tar.gz |
bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644)
(cherry picked from commit 8252c52e57283515ace5d4251584255dc5c60eb5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/typing.py')
-rw-r--r-- | Lib/typing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index eeebd85772..bd30da90ad 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1513,6 +1513,7 @@ Type.__doc__ = \ @runtime_checkable class SupportsInt(Protocol): + """An ABC with one abstract method __int__.""" __slots__ = () @abstractmethod @@ -1522,6 +1523,7 @@ class SupportsInt(Protocol): @runtime_checkable class SupportsFloat(Protocol): + """An ABC with one abstract method __float__.""" __slots__ = () @abstractmethod @@ -1531,6 +1533,7 @@ class SupportsFloat(Protocol): @runtime_checkable class SupportsComplex(Protocol): + """An ABC with one abstract method __complex__.""" __slots__ = () @abstractmethod @@ -1540,6 +1543,7 @@ class SupportsComplex(Protocol): @runtime_checkable class SupportsBytes(Protocol): + """An ABC with one abstract method __bytes__.""" __slots__ = () @abstractmethod @@ -1549,6 +1553,7 @@ class SupportsBytes(Protocol): @runtime_checkable class SupportsIndex(Protocol): + """An ABC with one abstract method __index__.""" __slots__ = () @abstractmethod @@ -1558,6 +1563,7 @@ class SupportsIndex(Protocol): @runtime_checkable class SupportsAbs(Protocol[T_co]): + """An ABC with one abstract method __abs__ that is covariant in its return type.""" __slots__ = () @abstractmethod @@ -1567,6 +1573,7 @@ class SupportsAbs(Protocol[T_co]): @runtime_checkable class SupportsRound(Protocol[T_co]): + """An ABC with one abstract method __round__ that is covariant in its return type.""" __slots__ = () @abstractmethod |