mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
38 lines
858 B
Nix
38 lines
858 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
tokenize-rt,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "add-trailing-comma";
|
|
version = "3.1.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asottile";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-B+wjBy42RwabVz/6qEMGpB0JmwJ9hqSskwcNj4x/B/k=";
|
|
};
|
|
|
|
propagatedBuildInputs = [ tokenize-rt ];
|
|
|
|
pythonImportsCheck = [ "add_trailing_comma" ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
meta = with lib; {
|
|
description = "Tool (and pre-commit hook) to automatically add trailing commas to calls and literals";
|
|
mainProgram = "add-trailing-comma";
|
|
homepage = "https://github.com/asottile/add-trailing-comma";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ gador ];
|
|
};
|
|
}
|