From 7b3a116d7602a25dd71b16133be44a35cb3d7cf1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 28 Jun 2018 14:49:54 +0200 Subject: Replace the '%s' % var pattern with str(var). --- poezio/core/handlers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'poezio/core/handlers.py') diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index 268c9733..d34534d0 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -1404,7 +1404,7 @@ class HandlerCore: """ When a data form is received """ - self.core.information('%s' % message) + self.core.information(str(message)) def on_attention(self, message): """ @@ -1430,11 +1430,11 @@ class HandlerCore: """ if self.core.xml_tab: if PYGMENTS: - xhtml_text = highlight('%s' % stanza, LEXER, FORMATTER) + xhtml_text = highlight(str(stanza), LEXER, FORMATTER) poezio_colored = xhtml.xhtml_to_poezio_colors( xhtml_text, force=True).rstrip('\x19o').strip() else: - poezio_colored = '%s' % stanza + poezio_colored = str(stanza) self.core.add_message_to_text_buffer( self.core.xml_buffer, poezio_colored, @@ -1459,11 +1459,11 @@ class HandlerCore: """ if self.core.xml_tab: if PYGMENTS: - xhtml_text = highlight('%s' % stanza, LEXER, FORMATTER) + xhtml_text = highlight(str(stanza), LEXER, FORMATTER) poezio_colored = xhtml.xhtml_to_poezio_colors( xhtml_text, force=True).rstrip('\x19o').strip() else: - poezio_colored = '%s' % stanza + poezio_colored = str(stanza) self.core.add_message_to_text_buffer( self.core.xml_buffer, poezio_colored, -- cgit v1.2.3