Skip to content

Y062 doesn't account for nested literals #485

Open
@tusharsadhwani

Description

According to spec, Literal[X, Y] should be treated as Union[Literal[X], Literal[Y], which means nested Literals should be supported by type checkers.

Hence raising Y062 for cases like Literal[1, Literal[2, 1]] would make sense I believe.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions