Skip to content

Non-hashable types should declare __hash__: None in typeshed #2148

Description

@ilevkivskyi

Currently this passes mypy:

from typing import Hashable

def f(x: Hashable):
    pass

f([])

A possible solution may be to add __hash__: None to non-hashable types like list.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions