mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 09:33:25 +08:00
Prefer to use ellipsis over pass (#2292)
This commit is contained in:
committed by
Jelle Zijlstra
parent
187aaaced9
commit
581705d9ee
@@ -14,6 +14,6 @@ class abstractproperty(property): ...
|
||||
def abstractstaticmethod(callable: _FuncT) -> _FuncT: ...
|
||||
def abstractclassmethod(callable: _FuncT) -> _FuncT: ...
|
||||
|
||||
class ABC(metaclass=ABCMeta):
|
||||
pass
|
||||
class ABC(metaclass=ABCMeta): ...
|
||||
|
||||
def get_cache_token() -> object: ...
|
||||
|
||||
@@ -184,12 +184,10 @@ class ConverterMapping(MutableMapping[str, Optional[_converter]]):
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
pass
|
||||
class Error(Exception): ...
|
||||
|
||||
|
||||
class NoSectionError(Error):
|
||||
pass
|
||||
class NoSectionError(Error): ...
|
||||
|
||||
|
||||
class DuplicateSectionError(Error):
|
||||
@@ -215,16 +213,14 @@ class InterpolationError(Error):
|
||||
option = ... # type: str
|
||||
|
||||
|
||||
class InterpolationDepthError(InterpolationError):
|
||||
pass
|
||||
class InterpolationDepthError(InterpolationError): ...
|
||||
|
||||
|
||||
class InterpolationMissingOptionError(InterpolationError):
|
||||
reference = ... # type: str
|
||||
|
||||
|
||||
class InterpolationSyntaxError(InterpolationError):
|
||||
pass
|
||||
class InterpolationSyntaxError(InterpolationError): ...
|
||||
|
||||
|
||||
class ParsingError(Error):
|
||||
|
||||
@@ -9,5 +9,4 @@ def getpass(prompt: str = ..., stream: Optional[TextIO] = ...) -> str: ...
|
||||
def getuser() -> str: ...
|
||||
|
||||
|
||||
class GetPassWarning(UserWarning):
|
||||
pass
|
||||
class GetPassWarning(UserWarning): ...
|
||||
|
||||
@@ -177,8 +177,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], metaclass=ABCMeta):
|
||||
pass
|
||||
Generic[_T_co, _T_contra, _V_co, _S], metaclass=ABCMeta): ...
|
||||
|
||||
@runtime
|
||||
class AsyncIterable(Protocol[_T_co]):
|
||||
|
||||
Reference in New Issue
Block a user