def run(self, i):
        if self.window is None:
            self.window = sublime.active_window()
        active_view = self.window.active_view()

        if self.last_view is not None and active_view != self.last_view:
            self.last_view.erase_status('_deviot_action_command')
            self.last_view = None

        if not self.thread.is_alive():
            def cleanup():
                active_view.erase_status('_deviot_action_command')
            if hasattr(self.thread, 'result') and not self.thread.result:
                cleanup()
                return
            active_view.set_status(
                '_deviot_action_command', self.success_message)
            sublime.set_timeout(cleanup, 5000)
            return

        before = i % self.size
        after = before - (self.size - 1)

        active_view.set_status('_deviot_action_command', '%s [%s=%s]' % (
            self.message, ' ' * before, ' ' * after))
        if self.last_view is None:
            self.last_view = active_view

        if not after:
            self.addend = -1
        if not before:
            self.addend = 1
        i += self.addend

        sublime.set_timeout(lambda: self.run(i), 100)
dataset/ETHPy150Open gepd/Deviot/libs/Progress.py/ThreadProgress.run/swapped operands of `-`