def onAutoIndentTriggered(self):
        """Indent current line or selected lines
        """
        cursor = self._qpart.textCursor()

        startBlock = self._qpart.document().findBlock(cursor.selectionStart())
        endBlock = self._qpart.document().findBlock(cursor.selectionEnd())

        if startBlock != endBlock:  # indent multiply lines
            stopBlock = endBlock.next()

            block = startBlock

            with self._qpart:
                while block != stopBlock:
                    self.autoIndentBlock(block, '')
                    block = block.next()
        else:  # indent 1 line
            self.autoIndentBlock(startBlock, '')
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("day", help="The day of the results, with format yyyymmdd")
    args = parser.parse_args()
    install_autopkgtest_results_formatter()
    with tempfile.TemporaryDirectory(dir=os.environ.get("HOME")) as temp_dir:
        clone_results_repo(temp_dir)
        format_results(temp_dir, ACTIVE_DISTROS, args.day)
        commit_and_push(temp_dir, args.day)