@@ -773,7 +773,7 @@ def mkargspec(self, topline, in_arg, down):
773773 if args :
774774 self .list_win .addstr (", " , punctuation_colpair )
775775 self .list_win .addstr (
776- "*%s" % ( _args ,) , get_colpair (self .config , "token" )
776+ f"* { _args } " , get_colpair (self .config , "token" )
777777 )
778778
779779 if kwonly :
@@ -799,7 +799,7 @@ def mkargspec(self, topline, in_arg, down):
799799 if args or _args or kwonly :
800800 self .list_win .addstr (", " , punctuation_colpair )
801801 self .list_win .addstr (
802- "**%s" % ( _kwargs ,) , get_colpair (self .config , "token" )
802+ f "**{ _kwargs } " , get_colpair (self .config , "token" )
803803 )
804804 self .list_win .addstr (")" , punctuation_colpair )
805805
@@ -978,7 +978,7 @@ def p_key(self, key):
978978 try :
979979 source = self .get_source_of_current_name ()
980980 except repl .SourceNotFound as e :
981- self .statusbar .message ("%s" % ( e ,) )
981+ self .statusbar .message (f" { e } " )
982982 else :
983983 if config .highlight_show_source :
984984 source = format (
@@ -1072,7 +1072,7 @@ def prompt(self, more):
10721072 """Show the appropriate Python prompt"""
10731073 if not more :
10741074 self .echo (
1075- "\x01 %s \x03 %s" % (self .config .color_scheme ["prompt" ], self .ps1 )
1075+ "\x01 {} \x03 {}" . format (self .config .color_scheme ["prompt" ], self .ps1 )
10761076 )
10771077 self .stdout_hist += self .ps1
10781078 self .screen_hist .append (
@@ -1081,10 +1081,10 @@ def prompt(self, more):
10811081 )
10821082 else :
10831083 prompt_more_color = self .config .color_scheme ["prompt_more" ]
1084- self .echo ("\x01 %s \x03 %s" % ( prompt_more_color , self .ps2 ) )
1084+ self .echo (f "\x01 { prompt_more_color } \x03 { self .ps2 } " )
10851085 self .stdout_hist += self .ps2
10861086 self .screen_hist .append (
1087- "\x01 %s \x03 %s \x04 " % ( prompt_more_color , self .ps2 )
1087+ f "\x01 { prompt_more_color } \x03 { self .ps2 } \x04 "
10881088 )
10891089
10901090 def push (self , s , insert_into_history = True ):
@@ -1480,7 +1480,7 @@ def undo(self, n=1):
14801480 def writetb (self , lines ):
14811481 for line in lines :
14821482 self .write (
1483- "\x01 %s \x03 %s" % (self .config .color_scheme ["error" ], line )
1483+ "\x01 {} \x03 {}" . format (self .config .color_scheme ["error" ], line )
14841484 )
14851485
14861486 def yank_from_buffer (self ):
@@ -1700,7 +1700,7 @@ def init_wins(scr, config):
17001700 )
17011701
17021702 message = " " .join (
1703- "<%s> %s" % ( key , command ) for command , key in commands if key
1703+ f"< { key } > { command } " for command , key in commands if key
17041704 )
17051705
17061706 statusbar = Statusbar (
0 commit comments