How to use the texttable.bcolors.RED function in texttable

To help you get started, we’ve selected a few texttable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grow / grow / grow / deployments / View on Github external
new_index = diff.indexes[1]

        table = texttable.Texttable(max_width=0)
        rows = []
        rows.append(['Action', 'Path', 'Last deployed', 'By'])
        file_rows = []
        for add in diff.adds:
                texttable.bcolors.GREEN, 'add', add))
        for edit in diff.edits:
                texttable.bcolors.PURPLE, 'edit', edit))
        for delete in diff.deletes:
                texttable.bcolors.RED, 'delete', delete))
        file_rows.sort(key=lambda row: row[1])
        rows += file_rows
        table.add_rows(rows)'\n' + table.draw() + '\n')
        if last_index.deployed and last_index.deployed_by:
  'Last deployed: {} by {}'.format(
                last_index.deployed, cls._format_author(last_index.deployed_by)))
        last_commit_sha = last_commit.sha if last_commit else ''
        new_commit_sha = new_commit.sha if new_commit else ''
        if new_index.deployed_by:
            between_commits = '{}..{}'.format(
            if new_commit:
                if new_commit.has_unstaged_changes:
                    between_commits += ' (with unstaged changes)'