Merge pull request #165692 from gador/add-add-trailing-comma

python3Packages.add-trailing-comma: init at 2.2.1
This commit is contained in:
Fabian Affolter 2022-03-27 16:28:45 +02:00 committed by GitHub
commit 7ef9b10187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
{ 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 ];
};
}

View File

@ -198,6 +198,8 @@ in {
inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation Security;
};
add-trailing-comma = callPackage ../development/python-modules/add-trailing-comma { };
addict = callPackage ../development/python-modules/addict { };
addic7ed-cli = callPackage ../development/python-modules/addic7ed-cli { };