Skip to content

Parameterless generic functions are allowed #2885

Closed
@miedzinski

Description

@miedzinski
from typing import TypeVar
T = TypeVar('T')
def f() -> T: ...

Mypy is absolutely OK with this code, but it makes no sense (it is not possible to return T without argument).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions