<commit_before>{ lib, buildPythonPackage, fetchFromGitHub, pytest, isPy3k, pyqt5, pyqt ? pyqt5 }:

buildPythonPackage rec {
  pname = "quamash";
  version = "0.6.1";

  disabled = !isPy3k;

  # No tests in PyPi tarball
  src = fetchFromGitHub {
    owner = "harvimt";
    repo = "quamash";
    rev = "version-${version}";
    sha256 = "117rp9r4lz0kfz4dmmpa35hp6nhbh6b4xq0jmgvqm68g9hwdxmqa";
  };
<commit_msg>python310Packages.quamash: fix build for 3.10<commit_after>{ lib, buildPythonPackage, fetchFromGitHub
, pytest, isPy3k, pyqt5, pyqt ? pyqt5
, fetchpatch
}:

buildPythonPackage rec {
  pname = "quamash";
  version = "0.6.1";

  disabled = !isPy3k;

  # No tests in PyPi tarball
  src = fetchFromGitHub {
    owner = "harvimt";
    repo = "quamash";
    rev = "version-${version}";
    sha256 = "117rp9r4lz0kfz4dmmpa35hp6nhbh6b4xq0jmgvqm68g9hwdxmqa";
  };

  patches = [
    # add 3.10 compatibility, merged remove on next update
    (fetchpatch {
      url = "https://github.com/harvimt/quamash/pull/126/commits/1e9047bec739dbc9d6ab337fc1a111a8b1090244.patch";
      sha256 = "sha256-6gomY82AOKkrt32SEBKnRugzhnC5FAyKDs6K5xaxnRM=";
    })
  ];

{'fraction_non_alphanumeric': 0.12173913043478261, 'fraction_numerical': 0.08956521739130435, 'mean_word_length': 3.939914163090129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '4734604', 'n_tokens_mistral': 546, 'n_tokens_neox': 493, 'n_words': 83}