2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-09 03:18:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-08-05 21:33:18 +00:00
|
|
|
, pythonOlder
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, tokenize-rt
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyupgrade";
|
2021-09-22 15:38:15 +00:00
|
|
|
version = "2.26.0";
|
2021-08-05 21:33:18 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asottile";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-22 15:38:15 +00:00
|
|
|
sha256 = "sha256-fXDBozMZbvMkdqafvPQrCI26OjQ/2Rx6OMQs9X2Q55s=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ tokenize-rt ];
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
pythonImportsCheck = [ "pyupgrade" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2021-04-13 19:44:15 +00:00
|
|
|
description = "Tool to automatically upgrade syntax for newer versions of the language";
|
|
|
|
homepage = "https://github.com/asottile/pyupgrade";
|
|
|
|
license = licenses.mit;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|