1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 hatchling, 6 pyflakes, 7 pytestCheckHook, 8 pythonOlder, 9 tomli, 10}: 11buildPythonPackage rec { 12 pname = "autoflake"; 13 version = "2.3.1"; 14 format = "pyproject"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-yYt13FsKhkWcTwGh0yrH60M47EMXpEaVFf8eaH7NkJ4="; 19 }; 20 21 nativeBuildInputs = [ hatchling ]; 22 23 propagatedBuildInputs = [ pyflakes ] ++ lib.optional (pythonOlder "3.11") tomli; 24 25 nativeCheckInputs = [ pytestCheckHook ]; 26 27 pythonImportsCheck = [ "autoflake" ]; 28 29 disabledTests = [ 30 # AssertionError: True is not false 31 "test_is_literal_or_name" 32 ]; 33 34 meta = with lib; { 35 description = "Tool to remove unused imports and unused variables"; 36 mainProgram = "autoflake"; 37 homepage = "https://github.com/myint/autoflake"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ yuriaisaka ]; 40 }; 41}