1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, aspy-refactor-imports 7, classify-imports 8}: 9 10buildPythonPackage rec { 11 pname = "reorder-python-imports"; 12 version = "3.9.0"; 13 disabled = pythonOlder "3.7"; 14 15 src = fetchFromGitHub { 16 owner = "asottile"; 17 repo = "reorder_python_imports"; 18 rev = "v${version}"; 19 hash = "sha256-z8giVbW8+k/y9Kg+O2tMle5MoRAar2Gccx2YCtFQvxw="; 20 }; 21 22 propagatedBuildInputs = [ 23 aspy-refactor-imports 24 classify-imports 25 ]; 26 27 pythonImportsCheck = [ 28 "reorder_python_imports" 29 ]; 30 31 checkInputs = [ 32 pytestCheckHook 33 ]; 34 35 # prints an explanation about PYTHONPATH first 36 # and therefore fails the assertion 37 disabledTests = [ 38 "test_success_messages_are_printed_on_stderr" 39 ]; 40 41 meta = with lib; { 42 description = "Tool for automatically reordering python imports"; 43 homepage = "https://github.com/asottile/reorder_python_imports"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ gador ]; 46 }; 47}