Skip to content

helpful-string incorrectly triggers on every generic #598

Open
@DetachHead

Description

@DetachHead

Describe the problem, ie expected/actual result (if it's not blatantly obvious)

No response

Gist to reproduce

from typing import TypeVar

_T = TypeVar("_T", bound=int)


def asdf(a: _T, b: int):
    print(f"{a}") # error: The type "_T@asdf" doesn't define a __format__, __str__ or __repr__ [helpful-string]
    print(f"{b}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp-1high

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions