cleanup ababstractproperty in typing.py (GH-16432)
This commit is contained in:
parent
0bcbfa43d5
commit
6ce03ec627
|
@ -17,7 +17,7 @@ At large scale, the structure of the module is following:
|
||||||
* Wrapper submodules for re and io related types.
|
* Wrapper submodules for re and io related types.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from abc import abstractmethod, abstractproperty, ABCMeta
|
from abc import abstractmethod, ABCMeta
|
||||||
import collections
|
import collections
|
||||||
import collections.abc
|
import collections.abc
|
||||||
import contextlib
|
import contextlib
|
||||||
|
@ -1794,11 +1794,13 @@ class IO(Generic[AnyStr]):
|
||||||
|
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def mode(self) -> str:
|
def mode(self) -> str:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1894,23 +1896,28 @@ class TextIO(IO[str]):
|
||||||
|
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def buffer(self) -> BinaryIO:
|
def buffer(self) -> BinaryIO:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def encoding(self) -> str:
|
def encoding(self) -> str:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def errors(self) -> Optional[str]:
|
def errors(self) -> Optional[str]:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def line_buffering(self) -> bool:
|
def line_buffering(self) -> bool:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractproperty
|
@property
|
||||||
|
@abstractmethod
|
||||||
def newlines(self) -> Any:
|
def newlines(self) -> Any:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue