From 47d2d36e489bc418ff0beb8141d112abed28dcaa Mon Sep 17 00:00:00 2001 From: hongweipeng <961365124@qq.com> Date: Fri, 27 Sep 2019 14:49:09 +0800 Subject: [PATCH] cleanup ababstractproperty in typing.py --- Lib/typing.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Lib/typing.py b/Lib/typing.py index b1ac33e00e7058..2c75a76964873b 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -17,7 +17,7 @@ * Wrapper submodules for re and io related types. """ -from abc import abstractmethod, abstractproperty, ABCMeta +from abc import abstractmethod, ABCMeta import collections import collections.abc import contextlib @@ -1794,11 +1794,13 @@ class IO(Generic[AnyStr]): __slots__ = () - @abstractproperty + @property + @abstractmethod def mode(self) -> str: pass - @abstractproperty + @property + @abstractmethod def name(self) -> str: pass @@ -1894,23 +1896,28 @@ class TextIO(IO[str]): __slots__ = () - @abstractproperty + @property + @abstractmethod def buffer(self) -> BinaryIO: pass - @abstractproperty + @property + @abstractmethod def encoding(self) -> str: pass - @abstractproperty + @property + @abstractmethod def errors(self) -> Optional[str]: pass - @abstractproperty + @property + @abstractmethod def line_buffering(self) -> bool: pass - @abstractproperty + @property + @abstractmethod def newlines(self) -> Any: pass