<commit_before>module Taskmeister
  class TaskList
    def initialize(tasks)
      @hash = {}

      tasks.each do |t|
        add(t)
      end
    end

    def to_short_list
      longest_id = @hash.keys.max {|id| id.length }
      @hash.map { |id, task|
        marker = task.notes? ? " »" : ""
        "%-#{longest_id.length}s - %s%s" % [id, task.text, marker]
      }
    end

    def tasks
      @hash.values
    end

    def [](key)
      @hash[key]
    end

    def add(task)<commit_msg>Fix column width on short_list<commit_after>module Taskmeister
  class TaskList
    def initialize(tasks)
      @hash = {}

      tasks.each do |t|
        add(t)
      end
    end

    def to_short_list
      longest_id = @hash.keys.max_by(&:length)
      @hash.map { |id, task|
        marker = task.notes? ? " »" : ""
        "%-#{longest_id.length}s - %s%s" % [id, task.text, marker]
      }
    end

    def tasks
      @hash.values
    end

    def [](key)
      @hash[key]
    end

    def add(task)
{'fraction_non_alphanumeric': 0.135, 'fraction_numerical': 0.0, 'mean_word_length': 1.7883008356545962, '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': '5910401', 'n_tokens_mistral': 369, 'n_tokens_neox': 361, 'n_words': 83}