2021-03-09 03:18:52 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
, lib
|
|
|
|
, pytestCheckHook
|
|
|
|
, tokenize-rt
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyupgrade";
|
2021-04-13 19:44:15 +00:00
|
|
|
version = "2.12.0";
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "asottile";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-13 19:44:15 +00:00
|
|
|
sha256 = "sha256-pAZszyv7jXEwtQYzEk5Zq2ULP0K2vX0y6IvR6wYsJ9c=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|