mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Reverts https://github.com/python/typeshed/pull/8465 Fixes https://github.com/python/typeshed/issues/10424 Closes https://github.com/python/typeshed/pull/10425 https://github.com/python/typeshed/pull/8465 caused regressions: see https://github.com/python/typeshed/issues/10424 and https://github.com/python/mypy/issues/13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
This commit is contained in:
@@ -316,6 +316,7 @@ class int:
|
||||
def __float__(self) -> float: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __abs__(self) -> int: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
def __index__(self) -> int: ...
|
||||
|
||||
@@ -379,6 +380,7 @@ class float:
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
def __abs__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
class complex:
|
||||
@@ -418,6 +420,7 @@ class complex:
|
||||
def __neg__(self) -> complex: ...
|
||||
def __pos__(self) -> complex: ...
|
||||
def __abs__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def __complex__(self) -> complex: ...
|
||||
@@ -585,6 +588,7 @@ class str(Sequence[str]):
|
||||
def __ge__(self, __value: str) -> bool: ...
|
||||
def __getitem__(self, __key: SupportsIndex | slice) -> str: ...
|
||||
def __gt__(self, __value: str) -> bool: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@overload
|
||||
def __iter__(self: LiteralString) -> Iterator[LiteralString]: ...
|
||||
@overload
|
||||
@@ -690,6 +694,7 @@ class bytes(Sequence[int]):
|
||||
def maketrans(__frm: ReadableBuffer, __to: ReadableBuffer) -> bytes: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __hash__(self) -> int: ...
|
||||
@overload
|
||||
def __getitem__(self, __key: SupportsIndex) -> int: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user