mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix int(Union[str, int]) (#1551)
This commit is contained in:
committed by
Jelle Zijlstra
parent
d7533152f9
commit
1f867d8ab8
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user