mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
gh-140251: colorize import statement formatting in asyncio console (#140252)
This commit is contained in:
parent
58c44c2bf2
commit
d86ad870cc
2 changed files with 5 additions and 1 deletions
|
@ -107,7 +107,10 @@ def run(self):
|
|||
if CAN_USE_PYREPL:
|
||||
theme = get_theme().syntax
|
||||
ps1 = f"{theme.prompt}{ps1}{theme.reset}"
|
||||
console.write(f"{ps1}import asyncio\n")
|
||||
import_line = f'{theme.keyword}import{theme.reset} asyncio'
|
||||
else:
|
||||
import_line = "import asyncio"
|
||||
console.write(f"{ps1}{import_line}\n")
|
||||
|
||||
if CAN_USE_PYREPL:
|
||||
from _pyrepl.simple_interact import (
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Colorize the default import statement ``import asyncio`` in asyncio REPL.
|
Loading…
Add table
Add a link
Reference in a new issue