1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 pytestCheckHook, 7 tokenize-rt, 8}: 9 10buildPythonPackage rec { 11 pname = "pyupgrade"; 12 version = "3.20.0"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "asottile"; 19 repo = "pyupgrade"; 20 rev = "v${version}"; 21 hash = "sha256-u4tbzxO7Q9+lGoAtg6cs0pyr/VCLmICOt6VVlvPmZV0="; 22 }; 23 24 propagatedBuildInputs = [ tokenize-rt ]; 25 26 nativeCheckInputs = [ pytestCheckHook ]; 27 28 pythonImportsCheck = [ "pyupgrade" ]; 29 30 meta = with lib; { 31 description = "Tool to automatically upgrade syntax for newer versions of the language"; 32 mainProgram = "pyupgrade"; 33 homepage = "https://github.com/asottile/pyupgrade"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ lovesegfault ]; 36 }; 37}