You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this was partially introduced by #8465. I ran into this issue while looking into microsoft/pyright#5446.
According to the python docs, a type that redefines __eq__ but not __hash__ is unhashable.
In the current typeshed hints, many types explicitly define __eq__ (int for example) but do not define hash. A type checker could incorrectly assume that the type is unhashable because of this.
The text was updated successfully, but these errors were encountered:
…10426)
Reverts #8465Fixes#10424Closes#10425#8465 caused regressions: see #10424 and python/mypy#13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
I believe this was partially introduced by #8465. I ran into this issue while looking into microsoft/pyright#5446.
According to the python docs, a type that redefines
__eq__
but not__hash__
is unhashable.In the current typeshed hints, many types explicitly define
__eq__
(int for example) but do not define hash. A type checker could incorrectly assume that the type is unhashable because of this.The text was updated successfully, but these errors were encountered: