<commit_before>{ lib, buildPythonPackage, fetchFromGitHub, python-editor, readchar, blessed, pytest, pytest-cov, pexpect, pytest-mock }:

buildPythonPackage rec {
  pname = "inquirer";
  version = "2.9.1";

  # PyPi archive currently broken: https://github.com/magmax/python-inquirer/issues/106
  src = fetchFromGitHub rec {
    owner = "magmax";
    repo = "python-inquirer";
    rev = version;
    sha256 = "0vdly2k4i7bfcqc8zh2miv9dbpmqvayxk72qn9d4hr7z15wph233";
  };

  propagatedBuildInputs = [ blessed python-editor readchar ];

  postPatch = ''
   substituteInPlace requirements.txt \
     --replace "blessed==1.17.6" "blessed~=1.17" \
     --replace "readchar==2.0.1" "readchar>=2.0.0"
  '';

  checkInputs = [ pytest pytest-cov pexpect pytest-mock ];

  checkPhase = ''
    pytest --cov-report=term-missing  --cov inquirer --no-cov-on-fail tests/unit tests/integration
  '';

  meta = with lib; {
    homepage = "https://github.com/magmax/python-inquirer";
    description = "A collection of common interactive command line user interfaces, based on Inquirer.js";
    license = licenses.mit;
    maintainers = [ maintainers.mmahut ];
  };
}<commit_msg>python3Packages.inquirer: fix build and src<commit_after>{ lib
, buildPythonPackage
, fetchFromGitHub

# native
, poetry-core

# propagated
, blessed
, python-editor
, readchar

# tests
, pytest-mock
, pytestCheckHook
, pexpect
}:

buildPythonPackage rec {
  pname = "inquirer";
  version = "2.9.1";
  format = "pyproject";

  src = fetchFromGitHub rec {
    owner = "magmax";
    repo = "python-inquirer";
    rev = "v${version}";
    sha256 = "sha256:0vdly2k4i7bfcqc8zh2miv9dbpmqvayxk72qn9d4hr7z15wph233";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    blessed
    python-editor
    readchar
  ];

  checkInputs = [
    pexpect
    pytest-mock
    pytestCheckHook
  ];

  meta = with lib; {
    homepage = "https://github.com/magmax/python-inquirer";
    description = "A collection of common interactive command line user interfaces, based on Inquirer.js";
    license = licenses.mit;
    maintainers = [ maintainers.mmahut ];
  };
}
{'fraction_non_alphanumeric': 0.12470698546647914, 'fraction_numerical': 0.030942334739803096, 'mean_word_length': 3.4644351464435146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 3, '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': '367491', 'n_tokens_mistral': 788, 'n_tokens_neox': 768, 'n_words': 150}