Fix default parameter syntax.

Use 'x:bool = ...' instead of 'x:bool = True' or 'x:bool = False'.
This commit is contained in:
Matthias Kramm
2016-01-22 16:39:15 -08:00
parent c83f4b57c7
commit 25a3fac0fd
3 changed files with 17 additions and 17 deletions

View File

@@ -228,7 +228,7 @@ class unicode(basestring, Sequence[unicode]):
def rsplit(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ...
def rstrip(self, chars: unicode = ...) -> unicode: ...
def split(self, sep: unicode = ..., maxsplit: int = ...) -> List[unicode]: ...
def splitlines(self, keepends: bool = False) -> List[unicode]: ...
def splitlines(self, keepends: bool = ...) -> List[unicode]: ...
def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = 0,
end: int = ...) -> bool: ...
def strip(self, chars: unicode = ...) -> unicode: ...
@@ -316,7 +316,7 @@ class str(basestring, Sequence[str]):
def split(self, sep: str = ..., maxsplit: int = ...) -> List[str]: ...
@overload
def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ...
def splitlines(self, keepends: bool = False) -> List[str]: ...
def splitlines(self, keepends: bool = ...) -> List[str]: ...
def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]]) -> bool: ...
@overload
def strip(self, chars: str = ...) -> str: ...
@@ -390,7 +390,7 @@ class bytearray(Sequence[int]):
def rsplit(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ...
def rstrip(self, chars: str = ...) -> bytearray: ...
def split(self, sep: str = ..., maxsplit: int = ...) -> List[bytearray]: ...
def splitlines(self, keepends: bool = False) -> List[bytearray]: ...
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
def startswith(self, prefix: Union[str, Tuple[str, ...]]) -> bool: ...
def strip(self, chars: str = ...) -> bytearray: ...
def swapcase(self) -> bytearray: ...
@@ -434,7 +434,7 @@ class bytearray(Sequence[int]):
def __ge__(self, x: str) -> bool: ...
class bool(int, SupportsInt, SupportsFloat):
def __init__(self, o: object = False) -> None: ...
def __init__(self, o: object = ...) -> None: ...
class slice:
start = 0
@@ -479,7 +479,7 @@ class list(MutableSequence[_T], Generic[_T]):
def insert(self, index: int, object: _T) -> None: ...
def remove(self, object: _T) -> None: ...
def reverse(self) -> None: ...
def sort(self, *, key: Callable[[_T], Any] = ..., reverse: bool = False) -> None: ...
def sort(self, *, key: Callable[[_T], Any] = ..., reverse: bool = ...) -> None: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T]: ...
@@ -716,7 +716,7 @@ def setattr(object: Any, name: unicode, value: Any) -> None: ...
def sorted(iterable: Iterable[_T], *,
cmp: Callable[[_T, _T], int] = ...,
key: Callable[[_T], Any] = ...,
reverse: bool = False) -> List[_T]: ...
reverse: bool = ...) -> List[_T]: ...
def sum(iterable: Iterable[_T], start: _T = ...) -> _T: ...
def unichr(i: int) -> unicode: ...
def vars(object: Any = ...) -> Dict[str, Any]: ...

View File

@@ -30,7 +30,7 @@ class HTTPResponse:
chunk_left = ... # type: Any
length = ... # type: Any
will_close = ... # type: Any
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering=False) -> None: ...
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering:bool=...) -> None: ...
def begin(self): ...
def close(self): ...
def isclosed(self): ...
@@ -58,7 +58,7 @@ class HTTPConnection:
def putheader(self, header, *values): ...
def endheaders(self, message_body=None): ...
def request(self, method, url, body=None, headers=...): ...
def getresponse(self, buffering=False): ...
def getresponse(self, buffering:bool=...): ...
class HTTP:
debuglevel = ... # type: Any
@@ -67,7 +67,7 @@ class HTTP:
def getfile(self): ...
file = ... # type: Any
headers = ... # type: Any
def getreply(self, buffering=False): ...
def getreply(self, buffering:bool=...): ...
def close(self): ...
class HTTPSConnection(HTTPConnection):

View File

@@ -51,10 +51,10 @@ class type:
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
def __init__(self, x: Union[SupportsInt, str, bytes] = None, base: int = None) -> None: ...
def bit_length(self) -> int: ...
def to_bytes(self, length: int, byteorder: str, *, signed: bool = False) -> bytes: ...
def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ...
@classmethod
def from_bytes(cls, bytes: Sequence[int], byteorder: str, *,
signed: bool = False) -> int: ... # TODO buffer object argument
signed: bool = ...) -> int: ... # TODO buffer object argument
def __add__(self, x: int) -> int: ...
def __sub__(self, x: int) -> int: ...
@@ -210,7 +210,7 @@ class str(Sequence[str]):
def rsplit(self, sep: str = None, maxsplit: int = -1) -> List[str]: ...
def rstrip(self, chars: str = None) -> str: ...
def split(self, sep: str = None, maxsplit: int = -1) -> List[str]: ...
def splitlines(self, keepends: bool = False) -> List[str]: ...
def splitlines(self, keepends: bool = ...) -> List[str]: ...
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: int = None,
end: int = None) -> bool: ...
def strip(self, chars: str = None) -> str: ...
@@ -287,7 +287,7 @@ class bytes(ByteString):
def rsplit(self, sep: bytes = None, maxsplit: int = -1) -> List[bytes]: ...
def rstrip(self, chars: bytes = None) -> bytes: ...
def split(self, sep: bytes = None, maxsplit: int = -1) -> List[bytes]: ...
def splitlines(self, keepends: bool = False) -> List[bytes]: ...
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
def strip(self, chars: bytes = None) -> bytes: ...
def swapcase(self) -> bytes: ...
@@ -358,7 +358,7 @@ class bytearray(MutableSequence[int], ByteString):
def rsplit(self, sep: bytes = None, maxsplit: int = -1) -> List[bytearray]: ...
def rstrip(self, chars: bytes = None) -> bytearray: ...
def split(self, sep: bytes = None, maxsplit: int = -1) -> List[bytearray]: ...
def splitlines(self, keepends: bool = False) -> List[bytearray]: ...
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
def startswith(self, prefix: bytes) -> bool: ...
def strip(self, chars: bytes = None) -> bytearray: ...
def swapcase(self) -> bytearray: ...
@@ -404,7 +404,7 @@ class memoryview():
def __init__(self, bytearray) -> None: ...
class bool(int, SupportsInt, SupportsFloat):
def __init__(self, o: object = False) -> None: ...
def __init__(self, o: object = ...) -> None: ...
class slice:
start = 0
@@ -453,7 +453,7 @@ class list(MutableSequence[_T], Generic[_T]):
def insert(self, index: int, object: _T) -> None: ...
def remove(self, object: _T) -> None: ...
def reverse(self) -> None: ...
def sort(self, *, key: Callable[[_T], Any] = None, reverse: bool = False) -> None: ...
def sort(self, *, key: Callable[[_T], Any] = None, reverse: bool = ...) -> None: ...
def __len__(self) -> int: ...
def __iter__(self) -> Iterator[_T]: ...
@@ -668,7 +668,7 @@ def next(i: Iterator[_T]) -> _T: ...
def next(i: Iterator[_T], default: _T) -> _T: ...
def oct(i: int) -> str: ... # TODO __index__
def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None,
errors: str = None, newline: str = None, closefd: bool = True) -> IO[Any]: ...
errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ...
def ord(c: Union[str, bytes, bytearray]) -> int: ...
# TODO: in Python 3.2, print() does not support flush
def print(*values: Any, sep: str = ' ', end: str = '\n', file: IO[str] = None, flush: bool = False) -> None: ...