From 1040882254bc6613f29c695f3de1ce2f53fbc592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 19 Apr 2018 09:19:32 +0200 Subject: [PATCH] Use new f-strings where possible --- solvable/src/event_handler_main.py | 2 +- solvable/src/test_fsm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index b30117c..5681adf 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -12,7 +12,7 @@ LOG = logging.getLogger(__name__) def cenator(history): LOG.debug('User executed command: "%s"', history[-1]) - MessageSender().send('JOHN CENA', 'You\'ve executed "{}"'.format(history[-1])) + MessageSender().send('JOHN CENA', f'You\'ve executed "{history[-1]}"') class TestCommands(TerminalCommands): diff --git a/solvable/src/test_fsm.py b/solvable/src/test_fsm.py index b5d8b2b..d9d1591 100644 --- a/solvable/src/test_fsm.py +++ b/solvable/src/test_fsm.py @@ -23,4 +23,4 @@ class TestFSM(LinearFSM): self.state_notify(5) def state_notify(self, state): - self.message_sender.send('TestFSM', 'Entered state {}!'.format(state)) + self.message_sender.send('TestFSM', f'Entered state {state}!')