depot/third_party/nixpkgs/pkgs/development/python-modules/add-trailing-comma/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

41 lines
830 B
Nix

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