8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
41 lines
819 B
Nix
41 lines
819 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, tokenize-rt
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "add-trailing-comma";
|
|
version = "2.2.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asottile";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "RBOL4mM9VciHHNmCTlRBIoXqeln19MKYxgv9p6GCNvU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
tokenize-rt
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"add_trailing_comma"
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A tool (and pre-commit hook) to automatically add trailing commas to calls and literals";
|
|
homepage = "https://github.com/asottile/add-trailing-comma";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ gador ];
|
|
};
|
|
}
|