Skip to content

stubgen doesn't support new PEP 695 type aliases #17997

@KapJI

Description

@KapJI

Bug Report

I see there is some work ongoing for adding PEP 695 support. Creating this issue to track support in stubgen.

To Reproduce

Run stubgen for:

type ListOrSet[T] = list[T] | set[T]

Expected Behavior

stubgen outputs:

type ListOrSet[T] = list[T] | set[T]

Actual Behavior

stubgen generates empty file.

Your Environment

  • Mypy version used: Latest master mypy 1.13.0+dev.603a3652b59c21e82927db407194b824b3ef7f7b
  • Mypy command-line flags: stubgen test.py
  • Python version used: 3.12.6

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions