diff --git a/stdlib/2/__builtin__.pyi b/stdlib/2/__builtin__.pyi index 05bfc1e09384..513f5c51c092 100644 --- a/stdlib/2/__builtin__.pyi +++ b/stdlib/2/__builtin__.pyi @@ -454,7 +454,7 @@ class bytearray(MutableSequence[int]): def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... - def __hash__(self) -> int: ... + __hash__: None @overload def __getitem__(self, i: int) -> int: ... @overload @@ -513,6 +513,7 @@ class slice(object): @overload def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ... def indices(self, len: int) -> Tuple[int, int, int]: ... + __hash__: None class tuple(Sequence[_T_co], Generic[_T_co]): def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... @@ -579,6 +580,7 @@ class list(MutableSequence[_T], Generic[_T]): def __ge__(self, x: List[_T]) -> bool: ... def __lt__(self, x: List[_T]) -> bool: ... def __le__(self, x: List[_T]) -> bool: ... + __hash__: None class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): # NOTE: Keyword arguments are special. If they are used, _KT must include @@ -621,6 +623,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 class set(MutableSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... @@ -657,6 +660,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 class frozenset(AbstractSet[_T], Generic[_T]): @overload diff --git a/stdlib/2/builtins.pyi b/stdlib/2/builtins.pyi index 05bfc1e09384..513f5c51c092 100644 --- a/stdlib/2/builtins.pyi +++ b/stdlib/2/builtins.pyi @@ -454,7 +454,7 @@ class bytearray(MutableSequence[int]): def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... - def __hash__(self) -> int: ... + __hash__: None @overload def __getitem__(self, i: int) -> int: ... @overload @@ -513,6 +513,7 @@ class slice(object): @overload def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ... def indices(self, len: int) -> Tuple[int, int, int]: ... + __hash__: None class tuple(Sequence[_T_co], Generic[_T_co]): def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ... @@ -579,6 +580,7 @@ class list(MutableSequence[_T], Generic[_T]): def __ge__(self, x: List[_T]) -> bool: ... def __lt__(self, x: List[_T]) -> bool: ... def __le__(self, x: List[_T]) -> bool: ... + __hash__: None class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): # NOTE: Keyword arguments are special. If they are used, _KT must include @@ -621,6 +623,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 class set(MutableSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... @@ -657,6 +660,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 class frozenset(AbstractSet[_T], Generic[_T]): @overload diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index eb6e27b5b306..9e3a37339ef0 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -489,7 +489,6 @@ class bytearray(MutableSequence[int], ByteString): def __repr__(self) -> str: ... def __int__(self) -> int: ... def __float__(self) -> float: ... - def __hash__(self) -> int: ... @overload def __getitem__(self, i: int) -> int: ... @overload @@ -513,6 +512,7 @@ class bytearray(MutableSequence[int], ByteString): def __le__(self, x: bytes) -> bool: ... def __gt__(self, x: bytes) -> bool: ... def __ge__(self, x: bytes) -> bool: ... + __hash__: None class memoryview(Sized, Container[bytes]): format = ... # type: str @@ -583,6 +583,7 @@ class slice: @overload def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ... def indices(self, len: int) -> Tuple[int, int, int]: ... + __hash__: None class tuple(Sequence[_T_co], Generic[_T_co]): def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... @@ -635,7 +636,6 @@ class list(MutableSequence[_T], Generic[_T]): def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T]: ... def __str__(self) -> str: ... - def __hash__(self) -> int: ... @overload def __getitem__(self, i: int) -> _T: ... @overload @@ -656,6 +656,7 @@ class list(MutableSequence[_T], Generic[_T]): def __ge__(self, x: List[_T]) -> bool: ... def __lt__(self, x: List[_T]) -> bool: ... def __le__(self, x: List[_T]) -> bool: ... + __hash__: None class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): # NOTE: Keyword arguments are special. If they are used, _KT must include @@ -694,6 +695,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 class set(MutableSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ... @@ -730,6 +732,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 class frozenset(AbstractSet[_T], Generic[_T]): def __init__(self, iterable: Iterable[_T] = ...) -> None: ...