-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed as not planned
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtopic-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 | |
if TYPE_CHECKING: | |
from threading import Thread | |
from types import TracebackType | |
from typing import Protocol |
cpython/Lib/_pyrepl/commands.py
Lines 35 to 37 in 4e3330f
# types | |
if False: | |
from .historical_reader import HistoricalReader |
cpython/Lib/_pyrepl/completing_reader.py
Lines 30 to 33 in 4e3330f
# types | |
Command = commands.Command | |
if False: | |
from .types import KeySpec, 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
stdlibPython modules in the Lib dirPython modules in the Lib dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement