Skip to content

Commit

Permalink
cleanup ababstractproperty in typing.py (GH-16432)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongweipeng authored and ilevkivskyi committed Sep 27, 2019
1 parent 0bcbfa4 commit 6ce03ec
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6ce03ec

Please sign in to comment.