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-08-10 14:31:46 +00:00
|
|
|
version = "2.23.3";
|
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-08-10 14:31:46 +00:00
|
|
|
sha256 = "sha256-Z17Bs3Mr1PJ9bYP2vsXTaJ85jOoIIlKLWR6D6s7enFs=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|