2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
2023-01-20 10:41:00 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-03-15 16:39:30 +00:00
|
|
|
, hatchling
|
2023-01-20 10:41:00 +00:00
|
|
|
, pyflakes
|
|
|
|
, pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonOlder
|
|
|
|
, tomli
|
2022-06-26 10:26:21 +00:00
|
|
|
}:
|
2023-01-20 10:41:00 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "autoflake";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.2.1";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
src = fetchPypi {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-Yre2RJppLDybDJFpGbvCFkjacoHoUGvPjT+CgOQx68E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
pyflakes
|
2023-07-15 17:15:38 +00:00
|
|
|
]
|
|
|
|
++ lib.optional (pythonOlder "3.11") tomli;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"autoflake"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: True is not false
|
|
|
|
"test_is_literal_or_name"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-26 10:26:21 +00:00
|
|
|
description = "Tool to remove unused imports and unused variables";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/myint/autoflake";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ yuriaisaka ];
|
|
|
|
};
|
|
|
|
}
|