Skip to content

Commit 158dab7

Browse files
committed
fix: colorize import statement formatting in asyncio console
Signed-off-by: Frost Ming <[email protected]>
1 parent 869bb69 commit 158dab7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/asyncio/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ def run(self):
107107
if CAN_USE_PYREPL:
108108
theme = get_theme().syntax
109109
ps1 = f"{theme.prompt}{ps1}{theme.reset}"
110-
console.write(f"{ps1}import asyncio\n")
110+
import_line = f'{theme.keyword}import{theme.reset} asyncio'
111+
else:
112+
import_line = "import asyncio"
113+
console.write(f"{ps1}{import_line}\n")
111114

112115
if CAN_USE_PYREPL:
113116
from _pyrepl.simple_interact import (

0 commit comments

Comments
 (0)