mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Convert selected ABCs to Protocols (#1220)
This commit is contained in:
committed by
Guido van Rossum
parent
7806420105
commit
ec2cb8e44f
@@ -103,7 +103,7 @@ class super:
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
|
||||
class int:
|
||||
@overload
|
||||
def __init__(self, x: Union[str, bytes, SupportsInt] = ...) -> None: ...
|
||||
@overload
|
||||
@@ -157,7 +157,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
|
||||
def __hash__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
class float:
|
||||
def __init__(self, x: Union[SupportsFloat, str, bytes] = ...) -> None: ...
|
||||
def as_integer_ratio(self) -> Tuple[int, int]: ...
|
||||
def hex(self) -> str: ...
|
||||
@@ -196,7 +196,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
def __hash__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
class complex(SupportsAbs[float]):
|
||||
class complex:
|
||||
@overload
|
||||
def __init__(self, re: float = ..., im: float = ...) -> None: ...
|
||||
@overload
|
||||
@@ -535,7 +535,7 @@ class memoryview(Sized, Container[bytes]):
|
||||
def hex(self) -> str: ...
|
||||
|
||||
|
||||
class bool(int, SupportsInt, SupportsFloat):
|
||||
class bool(int):
|
||||
def __init__(self, o: object = ...) -> None: ...
|
||||
|
||||
class slice:
|
||||
|
||||
Reference in New Issue
Block a user