summaryrefslogtreecommitdiffstats
path: root/ptpython/layout.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 20:03:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 20:03:26 +0000
commit75c118cf7675e6f19cbb80bc16e92740676c7f4b (patch)
treeb7840cfab1291920b36df87833c253051d4b54f0 /ptpython/layout.py
parentAdding upstream version 3.0.26. (diff)
downloadptpython-upstream.tar.xz
ptpython-upstream.zip
Adding upstream version 3.0.27.upstream/3.0.27upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ptpython/layout.py')
-rw-r--r--ptpython/layout.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ptpython/layout.py b/ptpython/layout.py
index 2c1ec15..622df59 100644
--- a/ptpython/layout.py
+++ b/ptpython/layout.py
@@ -1,6 +1,7 @@
"""
Creation of the `Layout` instance for the Python input/REPL.
"""
+
from __future__ import annotations
import platform
@@ -131,7 +132,7 @@ def python_sidebar(python_input: PythonInput) -> Window:
tokens.append(("class:sidebar" + sel, " >" if selected else " "))
tokens.append(("class:sidebar.label" + sel, "%-24s" % label, select_item))
tokens.append(("class:sidebar.status" + sel, " ", select_item))
- tokens.append(("class:sidebar.status" + sel, "%s" % status, goto_next))
+ tokens.append(("class:sidebar.status" + sel, f"{status}", goto_next))
if selected:
tokens.append(("[SetCursorPosition]", ""))
@@ -528,7 +529,7 @@ def create_exit_confirmation(
def get_text_fragments() -> StyleAndTextTuples:
# Show "Do you really want to exit?"
return [
- (style, "\n %s ([y]/n) " % python_input.exit_message),
+ (style, f"\n {python_input.exit_message} ([y]/n) "),
("[SetCursorPosition]", ""),
(style, " \n"),
]