Skip to content

Type dict key redeclaration #1566

@Yatt0Ikigai

Description

@Yatt0Ikigai

As I am new to pytype and unsure whether this behaviour is a bug or not, does pytype allow the redeclaration of TypedDict keys?

from typing import TypedDict

class my_map_type(TypedDict):
    y: str
    y: int

my_map: my_map_type = {"y":1, "y":"a"}

image

when mypy return
image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions