Skip to content

Red Knot shows types for literal expressions on hover #17289

@InSyncWithFoo

Description

@InSyncWithFoo

Minimal reproducible example (playground):

print(
    0  # Hover: `Literal[0]`
)

def f():
    '''Lorem ipsum dolor sit amet.'''  # Hover: `Literal["Lorem ipsum dolor sit amet."]`

This information is, arguably, redundant and should not be emitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tyMulti-file analysis & type inference

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions