mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Change numerous default values to ... (#1722)
This is the convention, and some default values (e.g. strings) apparently break pytype.
This commit is contained in:
committed by
Matthias Kramm
parent
66821993f6
commit
54dd6ba27c
@@ -198,7 +198,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
|
||||
class complex(SupportsAbs[float]):
|
||||
@overload
|
||||
def __init__(self, re: float = 0.0, im: float = 0.0) -> None: ...
|
||||
def __init__(self, re: float = ..., im: float = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, s: str) -> None: ...
|
||||
|
||||
@@ -240,10 +240,10 @@ class str(Sequence[str]):
|
||||
def casefold(self) -> str: ...
|
||||
def center(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def count(self, x: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ...
|
||||
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: Optional[int] = None,
|
||||
end: Optional[int] = None) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> str: ...
|
||||
def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ...
|
||||
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: Optional[int] = ...,
|
||||
end: Optional[int] = ...) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> str: ...
|
||||
def find(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def format(self, *args: Any, **kwargs: Any) -> str: ...
|
||||
def format_map(self, map: Mapping[str, Any]) -> str: ...
|
||||
@@ -262,20 +262,20 @@ class str(Sequence[str]):
|
||||
def join(self, iterable: Iterable[str]) -> str: ...
|
||||
def ljust(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def lower(self) -> str: ...
|
||||
def lstrip(self, chars: Optional[str] = None) -> str: ...
|
||||
def lstrip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def partition(self, sep: str) -> Tuple[str, str, str]: ...
|
||||
def replace(self, old: str, new: str, count: int = -1) -> str: ...
|
||||
def rfind(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
|
||||
def rsplit(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: ...
|
||||
def rstrip(self, chars: Optional[str] = None) -> str: ...
|
||||
def split(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: ...
|
||||
def rsplit(self, sep: Optional[str] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def rstrip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def split(self, sep: Optional[str] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[str]: ...
|
||||
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: Optional[int] = None,
|
||||
end: Optional[int] = None) -> bool: ...
|
||||
def strip(self, chars: Optional[str] = None) -> str: ...
|
||||
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: Optional[int] = ...,
|
||||
end: Optional[int] = ...) -> bool: ...
|
||||
def strip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def swapcase(self) -> str: ...
|
||||
def title(self) -> str: ...
|
||||
def translate(self, table: Union[Mapping[int, Union[int, str, None]], Sequence[Union[int, str, None]]]) -> str: ...
|
||||
@@ -312,7 +312,7 @@ class bytes(ByteString):
|
||||
def __init__(self, ints: Iterable[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, string: str, encoding: str,
|
||||
errors: str = 'strict') -> None: ...
|
||||
errors: str = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, length: int) -> None: ...
|
||||
@overload
|
||||
@@ -322,22 +322,22 @@ class bytes(ByteString):
|
||||
def capitalize(self) -> bytes: ...
|
||||
def center(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def count(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ...
|
||||
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytes: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def find(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def index(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
def isdigit(self) -> bool: ...
|
||||
@@ -348,25 +348,25 @@ class bytes(ByteString):
|
||||
def join(self, iterable: Iterable[bytes]) -> bytes: ...
|
||||
def ljust(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
def lower(self) -> bytes: ...
|
||||
def lstrip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def lstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = -1) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rfind(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rindex(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def split(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
|
||||
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def swapcase(self) -> bytes: ...
|
||||
def title(self) -> bytes: ...
|
||||
def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytes: ...
|
||||
@@ -405,7 +405,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
@overload
|
||||
def __init__(self, ints: Iterable[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, string: str, encoding: str, errors: str = 'strict') -> None: ...
|
||||
def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, length: int) -> None: ...
|
||||
@overload
|
||||
@@ -413,22 +413,22 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def capitalize(self) -> bytearray: ...
|
||||
def center(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def count(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ...
|
||||
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def endswith(self, suffix: bytes) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytearray: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def find(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def index(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def insert(self, index: int, object: int) -> None: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
@@ -440,25 +440,25 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def join(self, iterable: Iterable[bytes]) -> bytearray: ...
|
||||
def ljust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
def lower(self) -> bytearray: ...
|
||||
def lstrip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def lstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = -1) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rfind(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rindex(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def split(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
|
||||
def startswith(self, prefix: bytes) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def swapcase(self) -> bytearray: ...
|
||||
def title(self) -> bytearray: ...
|
||||
def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytearray: ...
|
||||
@@ -545,7 +545,7 @@ class slice:
|
||||
@overload
|
||||
def __init__(self, stop: Optional[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = None) -> None: ...
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ...
|
||||
def indices(self, len: int) -> Tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -566,7 +566,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ...
|
||||
def count(self, x: Any) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def index(self, x: Any, start: int = 0, end: int = 0) -> int: ...
|
||||
def index(self, x: Any, start: int = ..., end: int = ...) -> int: ...
|
||||
else:
|
||||
def index(self, x: Any) -> int: ...
|
||||
|
||||
@@ -588,7 +588,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def append(self, object: _T) -> None: ...
|
||||
def extend(self, iterable: Iterable[_T]) -> None: ...
|
||||
def pop(self, index: int = -1) -> _T: ...
|
||||
def index(self, object: _T, start: int = 0, stop: int = ...) -> int: ...
|
||||
def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ...
|
||||
def count(self, object: _T) -> int: ...
|
||||
def insert(self, index: int, object: _T) -> None: ...
|
||||
def remove(self, object: _T) -> None: ...
|
||||
@@ -635,7 +635,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Dict[_KT, _VT]: ...
|
||||
def popitem(self) -> Tuple[_KT, _VT]: ...
|
||||
def setdefault(self, k: _KT, default: Optional[_VT] = None) -> _VT: ...
|
||||
def setdefault(self, k: _KT, default: Optional[_VT] = ...) -> _VT: ...
|
||||
@overload
|
||||
def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
@@ -719,7 +719,7 @@ class frozenset(AbstractSet[_T], Generic[_T]):
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
|
||||
class enumerate(Iterator[Tuple[int, _T]], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ...
|
||||
def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[Tuple[int, _T]]: ...
|
||||
def __next__(self) -> Tuple[int, _T]: ...
|
||||
|
||||
@@ -730,9 +730,9 @@ class range(Sequence[int]):
|
||||
@overload
|
||||
def __init__(self, stop: int) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: int, stop: int, step: int = 1) -> None: ...
|
||||
def __init__(self, start: int, stop: int, step: int = ...) -> None: ...
|
||||
def count(self, value: int) -> int: ...
|
||||
def index(self, value: int, start: int = 0, stop: Optional[int] = None) -> int: ...
|
||||
def index(self, value: int, start: int = ..., stop: Optional[int] = ...) -> int: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
@@ -747,11 +747,11 @@ class property:
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = None,
|
||||
fset: Optional[Callable[[Any, Any], None]] = None,
|
||||
fdel: Optional[Callable[[Any], None]] = None,
|
||||
doc: Optional[str] = None) -> None: ...
|
||||
doc: Optional[str] = ...) -> None: ...
|
||||
def getter(self, fget: Callable[[Any], Any]) -> property: ...
|
||||
def setter(self, fset: Callable[[Any, Any], None]) -> property: ...
|
||||
def deleter(self, fdel: Callable[[Any], None]) -> property: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = None) -> Any: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ...
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
def __delete__(self, obj: Any) -> None: ...
|
||||
def fget(self) -> Any: ...
|
||||
@@ -767,7 +767,7 @@ def ascii(o: object) -> str: ...
|
||||
def bin(number: int) -> str: ...
|
||||
def callable(o: object) -> bool: ...
|
||||
def chr(code: int) -> str: ...
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = 0, dont_inherit: int = 0) -> CodeType: ...
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ...) -> CodeType: ...
|
||||
def copyright() -> None: ...
|
||||
def credits() -> None: ...
|
||||
def delattr(o: Any, name: str) -> None: ...
|
||||
@@ -790,7 +790,7 @@ def hash(o: object) -> int: ...
|
||||
def help(*args: Any, **kwds: Any) -> None: ...
|
||||
def hex(i: int) -> str: ... # TODO __index__
|
||||
def id(o: object) -> int: ...
|
||||
def input(prompt: Optional[Any] = None) -> str: ...
|
||||
def input(prompt: Optional[Any] = ...) -> str: ...
|
||||
@overload
|
||||
def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
@@ -826,15 +826,15 @@ if sys.version_info >= (3, 6):
|
||||
class _PathLike(Generic[AnyStr]):
|
||||
def __fspath__(self) -> AnyStr: ...
|
||||
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = 'r', buffering: int = -1, encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None, newline: Optional[str] = None, closefd: bool = ...) -> IO[Any]: ...
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
else:
|
||||
def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None, newline: Optional[str] = None, closefd: bool = ...) -> IO[Any]: ...
|
||||
def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., 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 = ..., file: Optional[IO[str]] = None, flush: bool = False) -> None: ...
|
||||
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = None, flush: bool = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
|
||||
@overload
|
||||
@@ -843,7 +843,7 @@ def pow(x: int, y: int, z: int) -> Any: ...
|
||||
def pow(x: float, y: float) -> float: ...
|
||||
@overload
|
||||
def pow(x: float, y: float, z: float) -> float: ...
|
||||
def quit(code: Optional[int] = None) -> None: ...
|
||||
def quit(code: Optional[int] = ...) -> None: ...
|
||||
@overload
|
||||
def reversed(object: Reversible[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
@@ -860,7 +860,7 @@ def round(number: SupportsRound[_T], ndigits: int) -> _T: ...
|
||||
def setattr(object: Any, name: str, value: Any) -> None: ...
|
||||
def sorted(iterable: Iterable[_T], *,
|
||||
key: Optional[Callable[[_T], Any]] = None,
|
||||
reverse: bool = False) -> List[_T]: ...
|
||||
reverse: bool = ...) -> List[_T]: ...
|
||||
@overload
|
||||
def sum(iterable: Iterable[_T]) -> Union[_T, int]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user