<commit_before>from __future__ import unicode_literals

from urwid import (Columns, Pile, Divider)
from ubuntui.utils import Color


class Table:
    def __init__(self):
        self.rows = Pile([])

    def addHeadings(self, headings):
        """ Takes list of headings and converts them to column header
        with appropriate color

        Params:
        headings: List of column text headings
        """
        cols = []
        for h in headings:
            h = Color.column_header(h)
            cols.append(h)
            cols.append(('fixed', 1,
                         Color.column_header(
                             Divider("\N{BOX DRAWINGS LIGHT VERTICAL}"))))
        self.addRow(Columns(cols))

    def addColumns(self, columns):
        cols = []
        for c in columns:
            cols.append(c)
            cols.append(('fixed', 1,
                         Divider("\N{BOX DRAWINGS LIGHT VERTICAL}")))
        self.addRow(Columns(cols))

    def addRow(self, item):
        """ Appends widget to Pile
        """
        self.rows.contents.append((item, self.rows.options()))
        self.rows.contents.append((
            Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}"),
            self.rows.options()))

    def render(self):
        return self.rows<commit_msg>no vertical bars<commit_after>from __future__ import unicode_literals

from urwid import (Columns, Pile, Divider)
from ubuntui.utils import Color


class Table:
    def __init__(self):
        self.rows = Pile([])

    def addHeadings(self, headings):
        """ Takes list of headings and converts them to column header
        with appropriate color

        Params:
        headings: List of column text headings
        """
        cols = []
        for h in headings:
            h = Color.column_header(h)
            cols.append(h)
        self.addRow(Columns(cols))

    def addColumns(self, columns):
        cols = []
        for c in columns:
            cols.append(c)
        self.addRow(Columns(cols))

    def addRow(self, item):
        """ Appends widget to Pile
        """
        self.rows.contents.append((item, self.rows.options()))
        self.rows.contents.append((
            Divider("\N{BOX DRAWINGS LIGHT HORIZONTAL}"),
            self.rows.options()))

    def render(self):
        return self.rows
{'fraction_non_alphanumeric': 0.10714285714285714, 'fraction_numerical': 0.0008605851979345956, 'mean_word_length': 1.9430379746835442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4706175', 'n_tokens_mistral': 688, 'n_tokens_neox': 649, 'n_words': 176}