Loading README.md +1 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ This job **disabled by default** and runs [black](https://black.readthedocs.io) | Input / Variable | Description | Default value | | ---------------- | ----------------------------------------------------------------------- | ----------------- | | `black-enabled` / `PYTHON_BLACK_ENABLED` | Set to `true` to enable black job | _none_ (disabled) | | `black-files` / `PYTHON_BLACK_FILES` | Files or directories to analyse | . | ### `py-isort` job Loading kicker.json +9 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,15 @@ "id": "black", "name": "black", "description": "Code formatting based on [black](https://black.readthedocs.io)", "enable_with": "PYTHON_BLACK_ENABLED" "enable_with": "PYTHON_BLACK_ENABLED", "variables": [ { "name": "PYTHON_BLACK_FILES", "description": "Files or directories to analyse", "default": ".", "advanced": true } ] }, { "id": "isort", Loading templates/gitlab-ci-python.yml +5 −1 Original line number Diff line number Diff line Loading @@ -178,6 +178,9 @@ spec: description: Enable black type: boolean default: false black-files: description: Files or directories to analyse default: '.' isort-enabled: description: Enable isort type: boolean Loading Loading @@ -355,6 +358,7 @@ variables: PYTHON_AUTO_RELEASE_ENABLED: $[[ inputs.auto-release-enabled ]] PYTHON_BLACK_ENABLED: $[[ inputs.black-enabled ]] PYTHON_BLACK_FILES: $[[ inputs.black-files ]] PYTHON_ISORT_ENABLED: $[[ inputs.isort-enabled ]] RUFF_ENABLED: $[[ inputs.ruff-enabled ]] RUFF_ARGS: $[[ inputs.ruff-args ]] Loading Loading @@ -1293,7 +1297,7 @@ py-black: script: - install_requirements - _pip install black - _run black . --check --extend-exclude '(\/\.cache\/|\/\.venv\/)' - _run black ${PYTHON_BLACK_FILES} --check --extend-exclude '(\/\.cache\/|\/\.venv\/)' rules: # exclude if $PYTHON_BLACK_ENABLED not set - if: '$PYTHON_BLACK_ENABLED != "true"' Loading Loading
README.md +1 −0 Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ This job **disabled by default** and runs [black](https://black.readthedocs.io) | Input / Variable | Description | Default value | | ---------------- | ----------------------------------------------------------------------- | ----------------- | | `black-enabled` / `PYTHON_BLACK_ENABLED` | Set to `true` to enable black job | _none_ (disabled) | | `black-files` / `PYTHON_BLACK_FILES` | Files or directories to analyse | . | ### `py-isort` job Loading
kicker.json +9 −1 Original line number Diff line number Diff line Loading @@ -277,7 +277,15 @@ "id": "black", "name": "black", "description": "Code formatting based on [black](https://black.readthedocs.io)", "enable_with": "PYTHON_BLACK_ENABLED" "enable_with": "PYTHON_BLACK_ENABLED", "variables": [ { "name": "PYTHON_BLACK_FILES", "description": "Files or directories to analyse", "default": ".", "advanced": true } ] }, { "id": "isort", Loading
templates/gitlab-ci-python.yml +5 −1 Original line number Diff line number Diff line Loading @@ -178,6 +178,9 @@ spec: description: Enable black type: boolean default: false black-files: description: Files or directories to analyse default: '.' isort-enabled: description: Enable isort type: boolean Loading Loading @@ -355,6 +358,7 @@ variables: PYTHON_AUTO_RELEASE_ENABLED: $[[ inputs.auto-release-enabled ]] PYTHON_BLACK_ENABLED: $[[ inputs.black-enabled ]] PYTHON_BLACK_FILES: $[[ inputs.black-files ]] PYTHON_ISORT_ENABLED: $[[ inputs.isort-enabled ]] RUFF_ENABLED: $[[ inputs.ruff-enabled ]] RUFF_ARGS: $[[ inputs.ruff-args ]] Loading Loading @@ -1293,7 +1297,7 @@ py-black: script: - install_requirements - _pip install black - _run black . --check --extend-exclude '(\/\.cache\/|\/\.venv\/)' - _run black ${PYTHON_BLACK_FILES} --check --extend-exclude '(\/\.cache\/|\/\.venv\/)' rules: # exclude if $PYTHON_BLACK_ENABLED not set - if: '$PYTHON_BLACK_ENABLED != "true"' Loading