mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Fix abstract classes for Python 3 (#2239)
* add metaclass=ABCMeta to some classes * mark some more classes as explicitly abstract * make some more classes concrete
This commit is contained in:
@@ -178,7 +178,7 @@ class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
# NOTE: This type does not exist in typing.py or PEP 484.
|
||||
# The parameters corrrespond to Generator, but the 4th is the original type.
|
||||
class AwaitableGenerator(Awaitable[_V_co], Generator[_T_co, _T_contra, _V_co],
|
||||
Generic[_T_co, _T_contra, _V_co, _S]):
|
||||
Generic[_T_co, _T_contra, _V_co, _S], metaclass=ABCMeta):
|
||||
pass
|
||||
|
||||
@runtime
|
||||
@@ -465,7 +465,7 @@ class TextIO(IO[str]):
|
||||
@abstractmethod
|
||||
def __enter__(self) -> TextIO: ...
|
||||
|
||||
class ByteString(Sequence[int]): ...
|
||||
class ByteString(Sequence[int], metaclass=ABCMeta): ...
|
||||
|
||||
class Match(Generic[AnyStr]):
|
||||
pos = 0
|
||||
|
||||
Reference in New Issue
Block a user