-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Modernize annotation usage in pyrepl #149985
Copy link
Copy link
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)
Bug description:
The pyrepl code uses
from __future__ import annotationsandif TYPE_CHECKINGunnecessarily. The former is mostly redundant on 3.14+, the latter can usually be replaced with lazy imports on 3.15+. Let's set a good example.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs