File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ cd "$PROJECT_ROOT" || exit 1
77STAGED_PYTHON_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
88STAGED_PRETTIER_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.md$' -e '\.jinja$' -e '\.html$' -e '\.css$')
99
10+ echo "Running tests..."
11+ pytest
12+ FORMAT_EXIT_CODE=$?
13+ if [ $FORMAT_EXIT_CODE -ne 0 ]; then
14+ echo ""
15+ echo "Commit aborted."
16+ exit 1
17+ fi
18+
1019if [ "$STAGED_PYTHON_FILES" ]; then
1120 echo "Checking formatting with Ruff for staged Python files..."
1221 ruff format --check $STAGED_PYTHON_FILES
Original file line number Diff line number Diff line change 11{% from "components.jinja" import icon %}
22
33<a
4- class =" inline-flex current-color"
4+ {% if is_external %}
5+ class =" inline-flex current-color"
6+ {% endif %}
57 href =" {{ url }}"
68 {% if is_external %}
79 target =" _blank"
You can’t perform that action at this time.
0 commit comments