Skip to content

feat: Support PEP 695 TypeVars syntax for the stubs generator. #68

@Masara

Description

@Masara

Is your feature request related to a problem?

Currently the PEP 695 TypeVars syntax is not supported for the stubs generator.

Desired solution

The code

def  func[T](a: T, b: T) -> T: ...

should produce the following stubs:

@Pure
fun func<T>(a: T) -> result1: T

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

See the comments here. I already added the stubs generation for these TypeVars, see commit 9c30988. Mypy currently does not support the PEP 695 syntax natively, which poses the problem that Python 3.11 does not support the snapshot tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions