<commit_before>module CanTango
  module Filters
    class Filter
      attr_reader :item, :include_list

      def initialize item, list = nil
        @item         = item.to_sym
        @include_list = list || []
      end

      def valid?
        return false if !in_include_list?
        return false if not_only?
        !excluded?
      end

      def in_include_list?
        return true if include_list.empty?
        include_list.include? item
      end

      def not_only?
        false
      end

      def excluded?
        false
      end
    end
  end
end



<commit_msg>fix filter bug<commit_after>module CanTango
  module Filters
    class Filter
      attr_reader :item, :include_list

      def initialize item, list = nil
        @item         = item.to_sym
        @include_list = list || []
      end

      def valid?
        return false if !in_include_list?
        return false if not_only?
        !excluded?
      end

      def in_include_list?
        return false if include_list.blank?
        include_list.include? item
      end

      def not_only?
        false
      end

      def excluded?
        false
      end
    end
  end
end




{'fraction_non_alphanumeric': 0.05110732538330494, 'fraction_numerical': 0.0, 'mean_word_length': 1.5938189845474613, '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': '6515066', 'n_tokens_mistral': 351, 'n_tokens_neox': 335, 'n_words': 104}