mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Fix default parameter syntax.
Use 'x:bool = ...' instead of 'x:bool = True' or 'x:bool = False'.
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user