From 70521339d9368477a64b6d1751ad773236b16af3 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 13 Oct 2023 12:33:01 +0200 Subject: [PATCH] [fix] black --exclude option is a regular expression When ``searx/static/themes/simple/node_modules`` are installed the test from black runs into this path / Error:: $ make test TEST [yamllint] $YAMLLINT_FILES TEST [black] $BLACK_TARGETS --- searx/static/themes/simple/node_modules/flatted/python/test.py 2023-10-13 10:09:50.460026 +0000 +++ searx/static/themes/simple/node_modules/flatted/python/test.py 2023-10-13 10:10:04.974335 +0000 @@ -1,9 +1,11 @@ from flatted import stringify as _stringify, parse ... black --exclude option is not a comma separated list, its a regular expression / see: $ black --help ... --exclude TEXT A regular expression that matches files and directories that should be excluded on recursive searches ... Signed-off-by: Markus Heiser --- manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manage b/manage index 58bafae01..49bfca4b0 100755 --- a/manage +++ b/manage @@ -44,7 +44,7 @@ PY_SETUP_EXTRAS='[test]' GECKODRIVER_VERSION="v0.33.0" # SPHINXOPTS= BLACK_OPTIONS=("--target-version" "py311" "--line-length" "120" "--skip-string-normalization") -BLACK_TARGETS=("--exclude" "searx/static,searx/languages.py" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests") +BLACK_TARGETS=("--exclude" "(searx/static|searx/languages.py)" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests") _dev_redis_sock="/usr/local/searxng-redis/run/redis.sock" # set SEARXNG_REDIS_URL if it is not defined and "{_dev_redis_sock}" exists.