<commit_before>module RedditKit
  class Client
    module Subreddits
      def subreddit_attributes(subreddit_name)
        if attributes = get("r/#{subreddit_name}/about/edit.json?raw_json=1")
          attributes.body[:data]
        end
      end

      def update_subreddit(subreddit_name, parameters = {})
        @modhash = user.attributes[:modhash]
        attributes = subreddit_attributes(subreddit_name)

        params = {
          type: attributes[:subreddit_type], link_type: attributes[:content_options],
          lang: attributes[:language], allow_top: true, show_media: attributes[:show_media], over_18: attributes[:over_18],
          sr: attributes[:subreddit_id], uh: @modhash, api_type: 'json',
          title: attributes[:title], description: attributes[:description],
          public_description: attributes[:public_description], wikimode: attributes[:wikimode],
          key_color: attributes[:key_color], show_media_preview: true, allow_images: attributes[:allow_images]
        }

        post('api/site_admin.json', params.merge(parameters))
      end
    end
  end
end
<commit_msg>stop fucking with the settings<commit_after>module RedditKit
  class Client
    module Subreddits
      def subreddit_attributes(subreddit_name)
        if attributes = get("r/#{subreddit_name}/about/edit.json?raw_json=1")
          attributes.body[:data]
        end
      end

      def update_subreddit(subreddit_name, parameters = {})
        @modhash = user.attributes[:modhash]
        attributes = subreddit_attributes(subreddit_name)

        params = attributes.merge(
          type: attributes[:subreddit_type],
          link_type: attributes[:content_options],
          lang: attributes[:language],
          allow_top: true,
          "header-title" => attributes[:header_hover_text],
          sr: attributes[:subreddit_id],
          uh: @modhash,
          api_type: 'json'
        )

        post('api/site_admin.json', params.merge(parameters))
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10473815461346633, 'fraction_numerical': 0.0029925187032418953, 'mean_word_length': 3.0443548387096775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5426953', 'n_tokens_mistral': 563, 'n_tokens_neox': 570, 'n_words': 109}