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-12-06 16:07:01 +00:00
|
|
|
version = "2.29.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
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-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-fN0+4/EeoMD2c16OgepjDWuUhowMxzM7nB3mkL3iDjc=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
tokenize-rt
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyupgrade"
|
|
|
|
];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|