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.13";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-eCSL9Y9er/zCreMGFB6tc/Q3M5lQ+ABF3Of4sHjloao=";
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 pythonImportsCheck = [ "vulture" ];
38
39 meta = with lib; {
40 description = "Finds unused code in Python programs";
41 homepage = "https://github.com/jendrikseipp/vulture";
42 changelog = "https://github.com/jendrikseipp/vulture/releases/tag/v${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ mcwitt ];
45 mainProgram = "vulture";
46 };
47}