<commit_before>module Attributor
  module Flatpack
    class Config < Attributor::Hash
      @key_type = Symbol

      def self.inherited(klass)
        super
        klass.options[:dsl_compiler] = ConfigDSLCompiler
      end

      def self.from_hash(object, _context, **_opts)
        config = new(object)
        config
      end

      def initialize(data = nil)
        @raw = data
        @contents = {}
      end

      def respond_to_missing?(name, *)
        attribute_name = name.to_s
        attribute_name.chomp!('=')

        return true if self.class.attributes.key?(attribute_name.to_sym)
        super
      end

      def method_missing(name, *args)
        attribute_name = name.to_s
        attribute_name.chomp!('=')

        sym = attribute_name.to_sym<commit_msg>copy undefs from attributor::model<commit_after>module Attributor
  module Flatpack
    class Config < Attributor::Hash
      # FIXME: this is not the way to fix this. Really we should add finalize! to Models.
      undef :timeout
      undef :format
      undef :test rescue nil

      @key_type = Symbol

      def self.inherited(klass)
        super
        klass.options[:dsl_compiler] = ConfigDSLCompiler
      end

      def self.from_hash(object, _context, **_opts)
        config = new(object)
        config
      end

      def initialize(data = nil)
        @raw = data
        @contents = {}
      end

      def respond_to_missing?(name, *)
        attribute_name = name.to_s
        attribute_name.chomp!('=')

        return true if self.class.attributes.key?(attribute_name.to_sym)
        super
      end

      def method_missing(name, *args)
        attribute_name = name.to_s
        attribute_name.chomp!('=')

        sym = attribute_name.to_sym
{'fraction_non_alphanumeric': 0.0867579908675799, 'fraction_numerical': 0.0, 'mean_word_length': 2.164259927797834, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1764530', 'n_tokens_mistral': 531, 'n_tokens_neox': 513, 'n_words': 124}