Update the remaining docstrings, update pre-commit hook, add docstring formatting CI, update CONTRIBUTING with formatting guidance (#2089)

This commit is contained in:
Mark Backman
2025-07-01 00:37:04 -04:00
committed by GitHub
parent 224d2cedc8
commit fd570b0377
122 changed files with 6858 additions and 1281 deletions

View File

@@ -1,3 +1,27 @@
#!/bin/sh
#!/bin/bash
NO_COLOR=1 ruff format --diff
# Color codes for output
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
echo "🔍 Running pre-commit checks..."
# Change to project root (one level up from scripts/)
cd "$(dirname "$0")/.."
# Format check
echo "📝 Checking code formatting..."
if ! NO_COLOR=1 ruff format --diff --check; then
echo -e "${RED}❌ Code formatting issues found. Run 'ruff format' to fix.${NC}"
exit 1
fi
# Lint check
echo "🔍 Running linter..."
if ! ruff check; then
echo -e "${RED}❌ Linting issues found.${NC}"
exit 1
fi
echo -e "${GREEN}✅ All pre-commit checks passed!${NC}"