567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
42 lines
996 B
Nix
42 lines
996 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
tokenize-rt,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "add-trailing-comma";
|
|
version = "4.0.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asottile";
|
|
repo = "add-trailing-comma";
|
|
tag = "v${version}";
|
|
hash = "sha256-Ts04kjhGE0lgrHyT+EuJsVLIYU/842azG1ZUHTyFijc=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ tokenize-rt ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "add_trailing_comma" ];
|
|
|
|
meta = {
|
|
description = "Tool (and pre-commit hook) to automatically add trailing commas to calls and literals";
|
|
homepage = "https://github.com/asottile/add-trailing-comma";
|
|
changelog = "https://github.com/asottile/add-trailing-comma/releases/tag/${src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ gador ];
|
|
mainProgram = "add-trailing-comma";
|
|
};
|
|
}
|