@@ -140,7 +140,7 @@ def readlines(self, x):
140140def DEBUG (s ):
141141 """This shouldn't ever be called in any release of bpython, so
142142 beat me up if you find anything calling it."""
143- open ('/home/bob/tmp/plonker' , 'a' ).write ("%s\n " % str (s ))
143+ open ('/home/bob/tmp/plonker' , 'a' ).write ("%s\n " % ( str (s ), ))
144144
145145
146146def make_colours ():
@@ -231,7 +231,7 @@ def showtraceback(self):
231231 def writetb (self , l ):
232232 """This outputs the traceback and should be overridden for anything
233233 fancy."""
234- map (self .write , ["\x01 y\x03 %s" % i for i in l ])
234+ map (self .write , ["\x01 y\x03 %s" % ( i , ) for i in l ])
235235
236236
237237class Repl (object ):
@@ -713,7 +713,7 @@ def mkargspec(self, topline, down):
713713 ln = len (str (i ))
714714 kw = None
715715 if kwargs and k + 1 > len (args ) - len (kwargs ):
716- kw = '%s' % str (kwargs [k - (len (args ) - len (kwargs ))])
716+ kw = str (kwargs [k - (len (args ) - len (kwargs ))])
717717 ln += len (kw ) + 1
718718
719719 if ln + x >= w :
@@ -746,12 +746,12 @@ def mkargspec(self, topline, down):
746746 if _args :
747747 self .list_win .addstr (', ' ,
748748 curses .color_pair (self ._C ["g" ]+ 1 ))
749- self .list_win .addstr ('*%s' % _args ,
749+ self .list_win .addstr ('*%s' % ( _args , ) ,
750750 curses .color_pair (self ._C ["m" ]+ 1 ))
751751 if _kwargs :
752752 self .list_win .addstr (', ' ,
753753 curses .color_pair (self ._C ["g" ]+ 1 ))
754- self .list_win .addstr ('**%s' % _kwargs ,
754+ self .list_win .addstr ('**%s' % ( _kwargs , ) ,
755755 curses .color_pair (self ._C ["m" ]+ 1 ))
756756 self .list_win .addstr (')' , curses .color_pair (self ._C ["y" ]+ 1 ))
757757
@@ -792,9 +792,9 @@ def write2file(self):
792792 f .write (s )
793793 f .close ()
794794 except IOError :
795- self .statusbar .message ("Disk write error for file '%s'." % fn )
795+ self .statusbar .message ("Disk write error for file '%s'." % ( fn , ) )
796796 else :
797- self .statusbar .message ('Saved to %s' % fn )
797+ self .statusbar .message ('Saved to %s' % ( fn , ) )
798798
799799 def pastebin (self ):
800800 """Upload to a pastebin and display the URL in the status bar."""
@@ -808,11 +808,11 @@ def pastebin(self):
808808 try :
809809 paste_id = pasteservice .pastes .newPaste ('pycon' , s )
810810 except XMLRPCError , e :
811- self .statusbar .message ( 'Upload failed: %s' % str (e ) )
811+ self .statusbar .message ( 'Upload failed: %s' % ( str (e ), ) )
812812 return
813813
814- paste_url = urljoin (pasteservice_url , '/show/%s/' % paste_id )
815- self .statusbar .message ('Pastebin URL: %s' % paste_url , 10 )
814+ paste_url = urljoin (pasteservice_url , '/show/%s/' % ( paste_id , ) )
815+ self .statusbar .message ('Pastebin URL: %s' % ( paste_url , ) , 10 )
816816
817817 def make_list (self , items ):
818818 """Compile a list of items. At the moment this simply returns
0 commit comments