style: use .format() instead of % formatting
diff --git a/examples/wxSerialConfigDialog.py b/examples/wxSerialConfigDialog.py
index a29b67d..0064a9c 100755
--- a/examples/wxSerialConfigDialog.py
+++ b/examples/wxSerialConfigDialog.py
@@ -99,7 +99,7 @@
self.choice_port.Clear()
self.ports = []
for n, (portname, desc, hwid) in enumerate(sorted(serial.tools.list_ports.comports())):
- self.choice_port.Append('%s - %s' % (portname, desc))
+ self.choice_port.Append(u'{} - {}'.format(portname, desc))
self.ports.append(portname)
if self.serial.name == portname:
preferred_index = n
@@ -115,7 +115,7 @@
if preferred_index is not None:
self.combo_box_baudrate.SetSelection(preferred_index)
else:
- self.combo_box_baudrate.SetValue(u'%d' % (self.serial.baudrate,))
+ self.combo_box_baudrate.SetValue(u'{}'.format(self.serial.baudrate))
if self.show & SHOW_FORMAT:
# fill in data bits and select current setting
self.choice_databits.Clear()