Skip to content

Hashable doesn't work #1746

Closed
Closed
@miedzinski

Description

@miedzinski

Typechecking Hashable seems broken.

from typing import Hashable


def f(x: Hashable):
    pass


f(0)
f('x')
$ mypy mypy.py
mypy.py:8: error: Argument 1 to "f" has incompatible type "int"; expected "Hashable"
mypy.py:9: error: Argument 1 to "f" has incompatible type "str"; expected "Hashable"
$ mypy -V
mypy 0.4.3-dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions