Skip to content

Confusing error message for dict literal #304

Closed
@JukkaL

Description

@JukkaL

I type checked this code:

from typing import Undefined, Dict
x = Undefined(Dict[int, str])
x = {'x': 1}

I got this error message:

x.py, line 3: List item 1 has incompatible type "Tuple[str, int]"

This is confusing since I'm not creating a list and I'm not using tuples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions