Prefer to use ellipsis over pass (#2292)

This commit is contained in:
Yusuke Miyazaki
2018-06-29 02:29:45 +09:00
committed by Jelle Zijlstra
parent 187aaaced9
commit 581705d9ee
15 changed files with 47 additions and 86 deletions

View File

@@ -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: ...

View File

@@ -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):

View File

@@ -9,5 +9,4 @@ def getpass(prompt: str = ..., stream: Optional[TextIO] = ...) -> str: ...
def getuser() -> str: ...
class GetPassWarning(UserWarning):
pass
class GetPassWarning(UserWarning): ...

View File

@@ -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]):