Skip to content

Instantiating a list or set loses literal generic type information #1815

@Avasam

Description

@Avasam

Summary

Feel free to rename or mark as duplicate if there's a pre-existing issue that better describes the root cause. The closest related I found was maybe #1648 / #1576

Passing a list of literals to list or set loses type information with ty. Whereas both mypy and pyright keep the literal generic types:

Image

Version

ty 0.0.1-alpha.32

Metadata

Metadata

Assignees

Labels

bidirectional inferenceInference of types that takes into account the context of a declared type or expected typegenericsBugs or features relating to ty's generics implementation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions