depot/third_party/nixpkgs/pkgs/development/python-modules/add-trailing-comma/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

41 lines
830 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, tokenize-rt
}:
buildPythonPackage rec {
pname = "add-trailing-comma";
version = "3.0.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "asottile";
repo = pname;
rev = "v${version}";
hash = "sha256-uknXi7fsCWK5ngCEyfpkjovCtvL5v6OwN5kVoBpNZsY=";
};
propagatedBuildInputs = [
tokenize-rt
];
pythonImportsCheck = [
"add_trailing_comma"
];
nativeCheckInputs = [
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 ];
};
}