Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed as not planned
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-featureA feature request or enhancementA feature request or enhancement
Description
Bug report
Bug description:
After this PR #111567 there were still some strange imports in Lib/_pyrepl, for example:
cpython/Lib/_pyrepl/_threading_handler.py
Lines 7 to 11 in 4e3330f
| TYPE_CHECKING=False | |
| ifTYPE_CHECKING: | |
| fromthreadingimportThread | |
| fromtypesimportTracebackType | |
| fromtypingimportProtocol |
cpython/Lib/_pyrepl/commands.py
Lines 35 to 37 in 4e3330f
| # types | |
| ifFalse: | |
| from .historical_readerimportHistoricalReader |
cpython/Lib/_pyrepl/completing_reader.py
Lines 30 to 33 in 4e3330f
| # types | |
| Command=commands.Command | |
| ifFalse: | |
| from .typesimportKeySpec, CommandName |
I just want to send a PR with a uniform style and understandable for everyone.
moreover, there are imports of types that are not put in the if block, although they are used only for type hinting.
There is also a warning import twice, global import and lazy import in Lib/_pyrepl/readline.py
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
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-featureA feature request or enhancementA feature request or enhancement