3a4df29a92
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
41 lines
791 B
Nix
41 lines
791 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
, pytestCheckHook
|
|
, tokenize-rt
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyupgrade";
|
|
version = "2.34.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asottile";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-3Go0w/7jcv1XzZ7ypSdPzMZgzEj2+sMlrIm4X1r34MA=";
|
|
};
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
tokenize-rt
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pyupgrade"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Tool to automatically upgrade syntax for newer versions of the language";
|
|
homepage = "https://github.com/asottile/pyupgrade";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
};
|
|
}
|