Skip to content

Y062 doesn't account for nested literals #485

Description

@tusharsadhwani

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

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