mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Mark some types as non-hashable (#3219)
Based on @JelleZijlstra's PR #2221. Fixes #2148
This commit is contained in:
@@ -734,7 +734,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def __repr__(self) -> str: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __float__(self) -> float: ...
|
||||
def __hash__(self) -> int: ...
|
||||
__hash__: None # type: ignore
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> int: ...
|
||||
@overload
|
||||
@@ -849,6 +849,7 @@ class slice(object):
|
||||
def __init__(self, stop: Any) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Any, stop: Any, step: Any = ...) -> None: ...
|
||||
__hash__: None # type: ignore
|
||||
def indices(self, len: int) -> Tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -906,7 +907,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __hash__(self) -> int: ...
|
||||
__hash__: None # type: ignore
|
||||
@overload
|
||||
def __getitem__(self, i: int) -> _T: ...
|
||||
@overload
|
||||
@@ -980,6 +981,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __str__(self) -> str: ...
|
||||
__hash__: None # type: ignore
|
||||
|
||||
class set(MutableSet[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
|
||||
@@ -1016,6 +1018,7 @@ class set(MutableSet[_T], Generic[_T]):
|
||||
def __lt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __ge__(self, s: AbstractSet[object]) -> bool: ...
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
__hash__: None # type: ignore
|
||||
|
||||
class frozenset(AbstractSet[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user