1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pint,
6 pytest-cov-stub,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10 toml,
11 tomli,
12}:
13
14buildPythonPackage rec {
15 pname = "vulture";
16 version = "2.14";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-y4J3kCoRON7qt5bsW+9wdqbgJIyjYHo/Pe4LbZ6bhBU=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = lib.optionals (pythonOlder "3.11") [ tomli ];
29
30 nativeCheckInputs = [
31 pint
32 pytest-cov-stub
33 pytestCheckHook
34 toml
35 ];
36
37 disabledTestPaths = [
38 # missing pytype package/executable
39 "tests/test_pytype.py"
40 ];
41
42 pythonImportsCheck = [ "vulture" ];
43
44 meta = with lib; {
45 description = "Finds unused code in Python programs";
46 homepage = "https://github.com/jendrikseipp/vulture";
47 changelog = "https://github.com/jendrikseipp/vulture/releases/tag/v${version}";
48 license = licenses.mit;
49 maintainers = with maintainers; [ mcwitt ];
50 mainProgram = "vulture";
51 };
52}