<commit_before>module Taskmeister
  class TaskListWriter
    def self.to_markdown(task_list)
      task_list.tasks.map(&:to_markdown).flatten
    end

    def self.to_markdown_file(task_list)
      return unless task_list.dirty?

      return task_list.file_path.delete if task_list.empty?<commit_msg>Only attempt to remove the file if it exists<commit_after>module Taskmeister
  class TaskListWriter
    def self.to_markdown(task_list)
      task_list.tasks.map(&:to_markdown).flatten
    end

    def self.to_markdown_file(task_list)
      return unless task_list.dirty?

      return task_list.file_path.delete if task_list.empty? && File.exist?(task_list.file_path)
{'fraction_non_alphanumeric': 0.07623318385650224, 'fraction_numerical': 0.0, 'mean_word_length': 4.114503816793893, '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': '3850373', 'n_tokens_mistral': 222, 'n_tokens_neox': 212, 'n_words': 42}