Files
nixpkgs/pkgs/development/tools/prospector/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

79 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
python3,
}:
let
setoptconf-tmp = python3.pkgs.callPackage ./setoptconf.nix { };
in
python3.pkgs.buildPythonApplication rec {
pname = "prospector";
version = "1.9.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-94JGKX91d2kul+KMYohga9KCOj6RN/YKpD8e4nWSOOM=";
};
pythonRelaxDeps = [
"pyflakes"
"pep8-naming"
"flake8"
];
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
bandit
dodgy
flake8
gitpython
mccabe
mypy
pep8-naming
pycodestyle
pydocstyle
pyflakes
pylint
pylint-celery
pylint-django
pylint-flask
pylint-plugin-utils
pyroma
pyyaml
requirements-detector
setoptconf-tmp
setuptools
toml
vulture
];
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
pythonImportsCheck = [
"prospector"
];
disabledTestPaths = [
# distutils.errors.DistutilsArgError: no commands supplied
"tests/tools/pyroma/test_pyroma_tool.py"
];
meta = with lib; {
description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity";
homepage = "https://github.com/PyCQA/prospector";
changelog = "https://github.com/PyCQA/prospector/blob/v${version}/CHANGELOG.rst";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ kamadorueda ];
};
}