__hash__ = None
in class definition should not emit assignment error
#16954
Labels
bug
mypy got something wrong
Bug Report
To suppress hash support in a class, it's recommended to include
__hash__ = None
in the class definition (it's also required by the ruff rule PLW1641). Unfortunately, mypy reports it as an error.To Reproduce
https://mypy-play.net/?mypy=latest&python=3.12&gist=2f1c3fd7eff039975b0203c916d75002
The text was updated successfully, but these errors were encountered: