<commit_before>/* global django */
(function($) {
  $(function() {
    $("#changelist-filter select.select-filter").on("change", function() {
      const value = $(this).val() || "";
      const name = this.name;
      window.location.search = makeSearch(window.location.search, name, value);
    });
  });
})(django.jQuery);

function makeSearch(currentSearch, name, value) {
  if (currentSearch === "") {
    return "?" + encodeURIComponent(name) + "=" + encodeURIComponent(value);
  }

  const searchParams = currentSearch
    .slice(1)
    .split("&")
    .map(function(searchPart) {
      return searchPart.split("=");
    })
    .filter(function(searchAssignment) {
      return searchAssignment.length === 2;
    })
    .map(function(searchAssignment) {
      return [
        decodeURIComponent(searchAssignment[0]),
        decodeURIComponent(searchAssignment[1])
      ];
    })
    .filter(function(searchAssignment) {
      return searchAssignment[0] !== name;
    });

  searchParams.push([name, value]);

  return (
    "?" +
    searchParams
      .map(function(paramAssignment) {
        return [
          encodeURIComponent(paramAssignment[0]),
          encodeURIComponent(paramAssignment[1])
        ].join("=");
      })
      .join("&")
  );
}<commit_msg>Chore: dernier fichier à linter par prettier<commit_after>/* global django */
(function ($) {
  $(function () {
    $("#changelist-filter select.select-filter").on("change", function () {
      const value = $(this).val() || "";
      const name = this.name;
      window.location.search = makeSearch(window.location.search, name, value);
    });
  });
})(django.jQuery);

function makeSearch(currentSearch, name, value) {
  if (currentSearch === "") {
    return "?" + encodeURIComponent(name) + "=" + encodeURIComponent(value);
  }

  const searchParams = currentSearch
    .slice(1)
    .split("&")
    .map(function (searchPart) {
      return searchPart.split("=");
    })
    .filter(function (searchAssignment) {
      return searchAssignment.length === 2;
    })
    .map(function (searchAssignment) {
      return [
        decodeURIComponent(searchAssignment[0]),
        decodeURIComponent(searchAssignment[1]),
      ];
    })
    .filter(function (searchAssignment) {
      return searchAssignment[0] !== name;
    });

  searchParams.push([name, value]);

  return (
    "?" +
    searchParams
      .map(function (paramAssignment) {
        return [
          encodeURIComponent(paramAssignment[0]),
          encodeURIComponent(paramAssignment[1]),
        ].join("=");
      })
      .join("&")
  );
}
{'fraction_non_alphanumeric': 0.16608863198458573, 'fraction_numerical': 0.005394990366088632, 'mean_word_length': 2.9393019726858878, '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': '5888694', 'n_tokens_mistral': 760, 'n_tokens_neox': 793, 'n_words': 127}