class CommandHistory(object):
    def __init__(self):
        self.history = {}

    def add_command(self, channel, command, args):
        if channel not in self.history:
            self.history[channel] = []

        self.history[channel].append({ 'action': command, 'args': args })

    def last_command(self, channel):
        if channel not in self.history:
            return None
        return self.history[channel][-1]

@@ -243,17 +243,16 @@
 append(%7B
- 
 'action'
@@ -274,17 +274,16 @@
 s': args
- 
 %7D)%0A%0A    

fix flake8 issues with command history