change empty bodies from "pass" to "..."

CONTRIBUTING.md says to prefer ... Not the most impactful change but fixing
these will allow us to lint for it in the future and get a consistent style.
This commit is contained in:
Jelle Zijlstra
2017-03-16 07:44:45 -07:00
committed by Łukasz Langa
parent 17be26165d
commit 349ff59f33
16 changed files with 53 additions and 53 deletions

View File

@@ -24,8 +24,8 @@ _T3 = TypeVar('_T3')
_T4 = TypeVar('_T4')
_TT = TypeVar('_TT', bound='type')
class staticmethod: pass # Special, only valid as a decorator.
class classmethod: pass # Special, only valid as a decorator.
class staticmethod: ... # Special, only valid as a decorator.
class classmethod: ... # Special, only valid as a decorator.
class object:
__doc__ = ... # type: Optional[str]

View File

@@ -9,6 +9,6 @@ class StreamWriter(codecs.StreamWriter):
class StreamReader(codecs.StreamReader):
pass
def getregentry() -> codecs.CodecInfo: pass
def encode(input: str, errors: str = ...) -> bytes: pass
def decode(input: bytes, errors: str = ...) -> str: pass
def getregentry() -> codecs.CodecInfo: ...
def encode(input: str, errors: str = ...) -> bytes: ...
def decode(input: bytes, errors: str = ...) -> str: ...

View File

@@ -11,5 +11,5 @@ class struct_spwd(object):
sp_expire = ... # type: int
sp_flag = ... # type: int
def getspall() -> List[struct_spwd]: pass
def getspnam() -> struct_spwd: pass
def getspall() -> List[struct_spwd]: ...
def getspnam() -> struct_spwd: ...

View File

@@ -127,7 +127,7 @@ class FrameType:
f_restricted = ... # type: bool
f_trace = ... # type: Callable[[], None]
def clear(self) -> None: pass
def clear(self) -> None: ...
SliceType = slice
class EllipsisType: ...

View File

@@ -15,7 +15,7 @@ from errno import (EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL,
_maptype = Dict[str, Any]
class ExitNow(Exception): pass
class ExitNow(Exception): ...
def read(obj: Any) -> None: ...
def write(obj: Any) -> None: ...

View File

@@ -26,8 +26,8 @@ _T3 = TypeVar('_T3')
_T4 = TypeVar('_T4')
_TT = TypeVar('_TT', bound='type')
class staticmethod: pass # Special, only valid as a decorator.
class classmethod: pass # Special, only valid as a decorator.
class staticmethod: ... # Special, only valid as a decorator.
class classmethod: ... # Special, only valid as a decorator.
class object:
__doc__ = ... # type: Optional[str]

View File

@@ -9,6 +9,6 @@ class StreamWriter(codecs.StreamWriter):
class StreamReader(codecs.StreamReader):
pass
def getregentry() -> codecs.CodecInfo: pass
def encode(input: str, errors: str = ...) -> bytes: pass
def decode(input: bytes, errors: str = ...) -> str: pass
def getregentry() -> codecs.CodecInfo: ...
def encode(input: str, errors: str = ...) -> bytes: ...
def decode(input: bytes, errors: str = ...) -> str: ...

View File

@@ -95,7 +95,7 @@ class Signature:
follow_wrapped: bool = True) -> 'Signature': ...
# The name is the same as the enum's name in CPython
class _ParameterKind: pass
class _ParameterKind: ...
class Parameter:
def __init__(self,

View File

@@ -1,5 +1,5 @@
from typing import Any
def getline(filename: str, lineno: int, module_globals: Any=...) -> str: pass
def clearcache() -> None: pass
def getlines(filename: str, module_globals: Any=...) -> None: pass
def getline(filename: str, lineno: int, module_globals: Any=...) -> str: ...
def clearcache() -> None: ...
def getlines(filename: str, module_globals: Any=...) -> None: ...

View File

@@ -18,7 +18,7 @@ class Queue(Generic[_T]):
def put_nowait(self, item: _T) -> None: ...
def join(self) -> None: ...
def qsize(self) -> int: ...
def task_done(self) -> None: pass
def task_done(self) -> None: ...
class PriorityQueue(Queue): ...
class LifoQueue(Queue): ...

View File

@@ -58,6 +58,6 @@ N_TOKENS = 0
NT_OFFSET = 0
tok_name = ... # type: Dict[int, str]
def ISTERMINAL(x: int) -> bool: pass
def ISNONTERMINAL(x: int) -> bool: pass
def ISEOF(x: int) -> bool: pass
def ISTERMINAL(x: int) -> bool: ...
def ISNONTERMINAL(x: int) -> bool: ...
def ISEOF(x: int) -> bool: ...

View File

@@ -129,7 +129,7 @@ class FrameType:
f_locals = ... # type: Dict[str, Any]
f_trace = ... # type: Callable[[], None]
def clear(self) -> None: pass
def clear(self) -> None: ...
class GetSetDescriptorType:
__name__ = ... # type: str

View File

@@ -63,11 +63,11 @@ class SupportsFloat(metaclass=ABCMeta):
class SupportsComplex(metaclass=ABCMeta):
@abstractmethod
def __complex__(self) -> complex: pass
def __complex__(self) -> complex: ...
class SupportsBytes(metaclass=ABCMeta):
@abstractmethod
def __bytes__(self) -> bytes: pass
def __bytes__(self) -> bytes: ...
class SupportsAbs(Generic[_T]):
@abstractmethod
@@ -180,10 +180,10 @@ class Container(Generic[_T_co]):
if sys.version_info >= (3, 6):
class Collection(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]): pass
class Collection(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]): ...
_Collection = Collection
else:
class _Collection(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]): pass
class _Collection(Sized, Iterable[_T_co], Container[_T_co], Generic[_T_co]): ...
class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]):
@overload

View File

@@ -48,4 +48,4 @@ class VerifiedHTTPSConnection(HTTPSConnection):
UnverifiedHTTPSConnection = ... # type: Any
class ConnectionError(Exception): pass
class ConnectionError(Exception): ...

View File

@@ -1 +1 @@
class CertificateError(ValueError): pass
class CertificateError(ValueError): ...

View File

@@ -23,7 +23,7 @@ class ElementChildIterator(Iterator['_Element']):
class _Element(Iterable['_Element']):
def addprevious(self, element: '_Element') -> None:
pass
...
attrib = ... # type: MutableMapping[str, str]
text = ... # type: AnyStr
@@ -32,7 +32,7 @@ class _Element(Iterable['_Element']):
def __iter__(self) -> ElementChildIterator: ...
class ElementBase(_Element):
pass
...
class _ElementTree:
def write(self,
@@ -47,29 +47,29 @@ class _ElementTree:
exclusive: bool = ...,
with_comments: bool = ...,
inclusive_ns_prefixes: ListAnyStr = ...) -> None:
pass
...
class _XSLTResultTree(SupportsBytes):
pass
...
class _XSLTQuotedStringParam:
pass
...
class XMLParser:
pass
...
class XMLSchema:
def __init__(self,
etree: Union[_Element, _ElementTree] = ...,
file: Union[AnyStr, typing.IO] = ...) -> None:
pass
...
def assertValid(self,
etree: Union[_Element, _ElementTree]) -> None:
pass
...
class XSLTAccessControl:
pass
...
class XSLT:
def __init__(self,
@@ -77,42 +77,42 @@ class XSLT:
extensions: Dict_Tuple2AnyStr_Any = ...,
regexp: bool = ...,
access_control: XSLTAccessControl = ...) -> None:
pass
...
def __call__(self,
_input: Union[_Element, _ElementTree],
profile_run: bool = ...,
**kwargs: Union[AnyStr, _XSLTQuotedStringParam]) -> _XSLTResultTree:
pass
...
@staticmethod
def strparam(s: AnyStr) -> _XSLTQuotedStringParam:
pass
...
def Element(_tag: AnyStr,
attrib: DictAnyStr = ...,
nsmap: DictAnyStr = ...,
**extra: AnyStr) -> _Element:
pass
...
def SubElement(_parent: _Element, _tag: AnyStr,
attrib: DictAnyStr = ...,
nsmap: DictAnyStr = ...,
**extra: AnyStr) -> _Element:
pass
...
def ElementTree(element: _Element = ...,
file: Union[AnyStr, typing.IO] = ...,
parser: XMLParser = ...) -> _ElementTree:
pass
...
def ProcessingInstruction(target: AnyStr, text: AnyStr = ...) -> _Element:
pass
...
def parse(source: Union[AnyStr, typing.IO],
parser: XMLParser = ...,
base_url: AnyStr = ...) -> _ElementTree:
pass
...
def fromstring(text: AnyStr,
@@ -134,31 +134,31 @@ def tostring(element_or_tree: Union[_Element, _ElementTree],
class _ErrorLog:
pass
...
class Error(Exception):
pass
...
class LxmlError(Error):
def __init__(self, message: Any, error_log: _ErrorLog = ...) -> None: ...
error_log = ... # type: _ErrorLog
class DocumentInvalid(LxmlError):
pass
...
class LxmlSyntaxError(LxmlError, SyntaxError):
pass
...
class ParseError(LxmlSyntaxError):
pass
...
class XMLSyntaxError(ParseError):
pass
...
class _Validator:
pass
...
class DTD(_Validator):
def __init__(self,