From 1f867d8ab8603eeb0fb72e7bf98f3687945e9d59 Mon Sep 17 00:00:00 2001 From: Luka Sterbic Date: Sat, 23 Sep 2017 15:59:15 +0200 Subject: [PATCH] Fix int(Union[str, int]) (#1551) --- stdlib/3/builtins.pyi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 0b1df7f26..8d0dfb883 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -105,9 +105,9 @@ class super: class int(SupportsInt, SupportsFloat, SupportsAbs[int]): @overload - def __init__(self, x: SupportsInt = ...) -> None: ... + def __init__(self, x: Union[str, bytes, SupportsInt] = ...) -> None: ... @overload - def __init__(self, x: Union[str, bytes], base: int = ...) -> None: ... + def __init__(self, x: Union[str, bytes], base: int) -> None: ... def bit_length(self) -> int: ... def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ... @@ -305,8 +305,6 @@ class str(Sequence[str]): def __iter__(self) -> Iterator[str]: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... - def __int__(self) -> int: ... - def __float__(self) -> float: ... def __hash__(self) -> int: ... class bytes(ByteString):