Make __hash__ a ClassVar for several classes where it is set to None (#7485)

This commit is contained in:
Alex Waygood
2022-03-19 12:59:10 +00:00
committed by GitHub
parent d9f1f7b81f
commit 4308915e06
5 changed files with 24 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any
from typing import Any, ClassVar
from typing_extensions import Literal, final
# _tkinter is meant to be only used internally by tkinter, but some tkinter
@@ -19,7 +19,7 @@ from typing_extensions import Literal, final
class Tcl_Obj:
string: str | bytes
typename: str
__hash__: None # type: ignore[assignment]
__hash__: ClassVar[None] # type: ignore[assignment]
def __eq__(self, __other): ...
def __ge__(self, __other): ...
def __gt__(self, __other): ...