From: Serhiy Storchaka Date: Wed, 9 Oct 2019 09:57:14 +0000 (+0300) Subject: [3.7] bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644). (GH-16673) X-Git-Tag: v3.7.6rc1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b354fc2bfe1a4624551907df396ed36ea8bf4ca;p=thirdparty%2FPython%2Fcpython.git [3.7] bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644). (GH-16673) (cherry picked from commit 8252c52e57283515ace5d4251584255dc5c60eb5) --- diff --git a/Lib/typing.py b/Lib/typing.py index dea7babaf792..ea8dea54a5a3 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1277,6 +1277,7 @@ Type.__doc__ = \ class SupportsInt(_Protocol): + """An ABC with one abstract method __int__.""" __slots__ = () @abstractmethod @@ -1285,6 +1286,7 @@ class SupportsInt(_Protocol): class SupportsFloat(_Protocol): + """An ABC with one abstract method __float__.""" __slots__ = () @abstractmethod @@ -1293,6 +1295,7 @@ class SupportsFloat(_Protocol): class SupportsComplex(_Protocol): + """An ABC with one abstract method __complex__.""" __slots__ = () @abstractmethod @@ -1301,6 +1304,7 @@ class SupportsComplex(_Protocol): class SupportsBytes(_Protocol): + """An ABC with one abstract method __bytes__.""" __slots__ = () @abstractmethod @@ -1309,6 +1313,7 @@ class SupportsBytes(_Protocol): class SupportsAbs(_Protocol[T_co]): + """An ABC with one abstract method __abs__ that is covariant in its return type.""" __slots__ = () @abstractmethod @@ -1317,6 +1322,7 @@ class SupportsAbs(_Protocol[T_co]): class SupportsRound(_Protocol[T_co]): + """An ABC with one abstract method __round__ that is covariant in its return type.""" __slots__ = () @abstractmethod