Bug report
Bug description:
After this PR #111567 there were still some strange imports in Lib/_pyrepl, for example:
|
TYPE_CHECKING = False |
|
if TYPE_CHECKING: |
|
from threading import Thread |
|
from types import TracebackType |
|
from typing import Protocol |
|
# types |
|
if False: |
|
from .historical_reader import HistoricalReader |
|
# 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
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
cpython/Lib/_pyrepl/commands.py
Lines 35 to 37 in 4e3330f
cpython/Lib/_pyrepl/completing_reader.py
Lines 30 to 33 in 4e3330f
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.pyCPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs