Open
Description
Feature
stubgen currently does not emit PEP 585 syntax, it should, it is permissible, and typeshed has been using PEP 585 syntax for a long while now.
For example, stubgen outputs the following non-PEP-585 syntax in the most current version.
from typing import Tuple
def get_sim_time() -> Tuple[int, int]: ...
Pitch
stubgen should output PEP-585 syntax.
def get_sim_time() -> tuple[int, int]: ...
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
hamdanal commentedon Jan 13, 2024
I have a working prototype of this that I haven't submitted yet. It uses some of the changes made in #16519 so I would like for that PR to get merged first (the other PR is also less controversial so if it is not accepted I don't this will be accepted).
stubgen: Replace obsolete typing aliases with builtin containers (#16780
stubgen: Replace obsolete typing aliases with builtin containers (pyt…