<commit_before>module Mantis

  class Filters

    def initialize session
      @session = session
    end

    def by_project(project_id)
      @session.response_trimmed :mc_filter_get, {
        project_id: project_id
      }
    end

    alias :list :by_project

    def raw_issues_for(project_id, filter_id, page_num=0, per_page=50)
      @session.response_trimmed :mc_filter_get_issues, {
        project_id: project_id,
        filter_id: filter_id,
        page_number: page_num,
        per_page: per_page
      }
    end

    def issues_for(project_id, filter_id, page_num=0, per_page=50)<commit_msg>fix a test that expects Filters to return an array[]<commit_after>module Mantis

  class Filters

    def initialize session
      @session = session
    end

    def by_project(project_id)
      filters = [] << @session.response_trimmed(:mc_filter_get, {
        project_id: project_id
      })
      binding.pry
      filters.map { |f| Mantis::XSD::FilterData.new f }
    end

    alias :list :by_project

    def raw_issues_for(project_id, filter_id, page_num=0, per_page=50)
      @session.response_trimmed :mc_filter_get_issues, {
        project_id: project_id,
        filter_id: filter_id,
        page_number: page_num,
        per_page: per_page
      }
    end

    def issues_for(project_id, filter_id, page_num=0, per_page=50)
{'fraction_non_alphanumeric': 0.07863501483679525, 'fraction_numerical': 0.008902077151335312, 'mean_word_length': 2.865329512893983, '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': '7022671', 'n_tokens_mistral': 466, 'n_tokens_neox': 445, 'n_words': 95}