<commit_before>{ lib, buildPythonPackage, fetchPypi, coverage, nose, six }:

buildPythonPackage rec {
  pname = "attrdict";
  version = "2.0.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "35c90698b55c683946091177177a9e9c0713a0860f0e049febd72649ccd77b70";
  };

  propagatedBuildInputs = [ coverage nose six ];

  meta = with lib; {
    description = "A dict with attribute-style access";
    homepage = "https://github.com/bcj/AttrDict";
    license = licenses.mit;
  };
}<commit_msg>python3Packages.attrdict: refactor for Python 3.10<commit_after>{ lib
, buildPythonPackage
, fetchPypi
, coverage
, pythonOlder
, nose
, pytestCheckHook
, six
}:

buildPythonPackage rec {
  pname = "attrdict";
  version = "2.0.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-NckGmLVcaDlGCRF3F3qenAcToIYPDgSf69cmSczXe3A=";
  };

  propagatedBuildInputs = [
    six
  ];

  checkInputs = [
    coverage
    nose
  ];

  postPatch = ''
    substituteInPlace attrdict/merge.py \
      --replace "from collections" "from collections.abc"
    substituteInPlace attrdict/mapping.py \
      --replace "from collections" "from collections.abc"
    substituteInPlace attrdict/default.py \
      --replace "from collections" "from collections.abc"
    substituteInPlace attrdict/mixins.py \
      --replace "from collections" "from collections.abc"
  '';

  # Tests are not shipped and source is not tagged
  doCheck = false;

  pythonImportsCheck = [
    "attrdict"
  ];

  meta = with lib; {
    description = "A dict with attribute-style access";
    homepage = "https://github.com/bcj/AttrDict";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}
{'fraction_non_alphanumeric': 0.11327231121281464, 'fraction_numerical': 0.04004576659038902, 'mean_word_length': 3.3507462686567164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '250441', 'n_tokens_mistral': 637, 'n_tokens_neox': 594, 'n_words': 131}