Skip to content

Commit 6ce03ec

Browse files
hongweipengilevkivskyi
authored andcommitted
cleanup ababstractproperty in typing.py (GH-16432)
1 parent 0bcbfa4 commit 6ce03ec

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

Diff for: Lib/typing.py

+15-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Wrapper submodules for re and io related types.
1818
"""
1919

20-
from abc import abstractmethod, abstractproperty, ABCMeta
20+
from abc import abstractmethod, ABCMeta
2121
import collections
2222
import collections.abc
2323
import contextlib
@@ -1794,11 +1794,13 @@ class IO(Generic[AnyStr]):
17941794

17951795
__slots__ = ()
17961796

1797-
@abstractproperty
1797+
@property
1798+
@abstractmethod
17981799
def mode(self) -> str:
17991800
pass
18001801

1801-
@abstractproperty
1802+
@property
1803+
@abstractmethod
18021804
def name(self) -> str:
18031805
pass
18041806

@@ -1894,23 +1896,28 @@ class TextIO(IO[str]):
18941896

18951897
__slots__ = ()
18961898

1897-
@abstractproperty
1899+
@property
1900+
@abstractmethod
18981901
def buffer(self) -> BinaryIO:
18991902
pass
19001903

1901-
@abstractproperty
1904+
@property
1905+
@abstractmethod
19021906
def encoding(self) -> str:
19031907
pass
19041908

1905-
@abstractproperty
1909+
@property
1910+
@abstractmethod
19061911
def errors(self) -> Optional[str]:
19071912
pass
19081913

1909-
@abstractproperty
1914+
@property
1915+
@abstractmethod
19101916
def line_buffering(self) -> bool:
19111917
pass
19121918

1913-
@abstractproperty
1919+
@property
1920+
@abstractmethod
19141921
def newlines(self) -> Any:
19151922
pass
19161923

0 commit comments

Comments
 (0)