fix: CI failures caused by a ruff version mismatch (#36358)

This commit is contained in:
Michael S. Molina
2025-12-01 15:35:22 -05:00
committed by GitHub
parent 92986c2ecc
commit b12f5f8394
5 changed files with 16 additions and 5 deletions

View File

@@ -71,7 +71,9 @@ jobs:
GIT_DIFF_EXIT_CODE=$?
if [ "${PRE_COMMIT_EXIT_CODE}" -ne 0 ] || [ "${GIT_DIFF_EXIT_CODE}" -ne 0 ]; then
if [ "${PRE_COMMIT_EXIT_CODE}" -ne 0 ]; then
echo "❌ Pre-commit check failed (exit code: ${EXIT_CODE})."
echo "❌ Pre-commit check failed (exit code: ${PRE_COMMIT_EXIT_CODE})."
echo "🔍 Modified files:"
git diff --name-only
else
echo "❌ Git working directory is dirty."
echo "📌 This likely means that pre-commit made changes that were not committed."

View File

@@ -106,12 +106,19 @@ repos:
files: helm
verbose: false
args: ["--log-level", "error"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.7
# Using local hooks ensures ruff version matches requirements/development.txt
- repo: local
hooks:
- id: ruff-format
name: ruff-format
entry: ruff format
language: system
types: [python]
- id: ruff
args: [--fix]
name: ruff
entry: ruff check --fix --show-fixes
language: system
types: [python]
- repo: local
hooks:
- id: pylint

View File

@@ -19,6 +19,7 @@
# Import all settings from the main config first
from flask_caching.backends.filesystemcache import FileSystemCache
from superset_config import * # noqa: F403
# Override caching to use simple in-memory cache instead of Redis

View File

@@ -352,6 +352,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
"superset/translations/utils.py" = ["TID251"]
"superset/extensions/__init__.py" = ["TID251"]
"superset/utils/json.py" = ["TID251"]
"docker/*" = ["I"] # Docker config files have non-standard imports that vary by environment
[tool.ruff.lint.isort]
case-sensitive = false

View File

@@ -886,7 +886,7 @@ rsa==4.9.1
# via
# -c requirements/base-constraint.txt
# google-auth
ruff==0.8.0
ruff==0.9.7
# via apache-superset
secretstorage==3.4.1
# via keyring