python3Packages.detect-secrets: separate optional dependencies (#542611)

This commit is contained in:
Peder Bergebakken Sundt
2026-07-20 17:34:04 +00:00
committed by GitHub
@@ -13,6 +13,8 @@
setuptools,
unidiff,
writableTmpDirAsHomeHook,
withGibberish ? true,
withWordList ? true,
}:
buildPythonPackage rec {
@@ -31,11 +33,20 @@ buildPythonPackage rec {
build-system = [ setuptools ];
dependencies = [
gibberish-detector
pyyaml
pyahocorasick
requests
];
]
++ lib.optionals withGibberish optional-dependencies.gibberish
++ lib.optionals withWordList optional-dependencies.word_list;
optional-dependencies = {
gibberish = [
gibberish-detector
];
word_list = [
pyahocorasick
];
};
nativeCheckInputs = [
mock
@@ -51,11 +62,8 @@ buildPythonPackage rec {
"test_basic"
"test_handles_each_path_separately"
"test_handles_multiple_directories"
"test_load_and_output"
"test_make_decisions"
"test_restores_line_numbers"
"test_saves_to_baseline"
"test_scan_all_files"
"test_start_halfway"
];