Add __hash__ for a bunch of types that set it to None (#13286)

This commit is contained in:
Stephen Morton
2024-12-23 23:16:22 -08:00
committed by GitHub
parent 1f0a86ceb4
commit 3944c7839e
32 changed files with 69 additions and 27 deletions

View File

@@ -6,7 +6,7 @@ from collections.abc import Callable, Iterable, Mapping
from datetime import datetime
from io import BytesIO
from types import TracebackType
from typing import Any, Final, Literal, Protocol, overload
from typing import Any, ClassVar, Final, Literal, Protocol, overload
from typing_extensions import Self, TypeAlias
class _SupportsTimeTuple(Protocol):
@@ -76,6 +76,7 @@ def _strftime(value: _XMLDate) -> str: ... # undocumented
class DateTime:
value: str # undocumented
def __init__(self, value: int | str | datetime | time.struct_time | tuple[int, ...] = 0) -> None: ...
__hash__: ClassVar[None] # type: ignore[assignment]
def __lt__(self, other: _DateTimeComparable) -> bool: ...
def __le__(self, other: _DateTimeComparable) -> bool: ...
def __gt__(self, other: _DateTimeComparable) -> bool: ...
@@ -95,6 +96,7 @@ class Binary:
def decode(self, data: ReadableBuffer) -> None: ...
def encode(self, out: SupportsWrite[str]) -> None: ...
def __eq__(self, other: object) -> bool: ...
__hash__: ClassVar[None] # type: ignore[assignment]
def _binary(data: ReadableBuffer) -> Binary: ... # undocumented