style: refactor codebase to adhere to PEP 8 formatting standards throughout all source files

This commit is contained in:
2026-05-12 23:55:58 +02:00
parent bcc11cb07e
commit 8e9e4c01d4
17 changed files with 443 additions and 171 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
# pre-commit hook: runs ruff check on staged Python files before every commit
# To bypass: git commit --no-verify
# Get list of staged Python files
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
if [ -z "$STAGED_FILES" ]; then
exit 0
fi
echo "🔍 Running ruff check on staged files..."
uv run ruff check $STAGED_FILES
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo ""
echo "❌ ruff check failed. Commit aborted."
echo " Fix the issues above or run: uv run ruff check --fix"
echo " To bypass: git commit --no-verify"
exit 1
fi
echo "✅ ruff check passed."
exit 0