2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
hatchling,
|
|
|
|
pyflakes,
|
|
|
|
pytestCheckHook,
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.3.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;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-yYt13FsKhkWcTwGh0yrH60M47EMXpEaVFf8eaH7NkJ4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pyflakes ] ++ lib.optional (pythonOlder "3.11") tomli;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "autoflake" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "autoflake";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/myint/autoflake";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ yuriaisaka ];
|
|
|
|
};
|
|
|
|
}
|