File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 2828 - name : Run mypy on allowlist
2929 run : uvx poetry run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt
3030
31- - name : Run ruff check
32- run : uvx ruff check .
33-
34- - name : Run ruff format
35- run : uvx ruff format .
31+ - name : Run ruff check on changed files
32+ run : |
33+ CHANGED_FILES=$(git diff --name-only origin/main -- '*.py')
34+ if [ -n "$CHANGED_FILES" ]; then
35+ uvx ruff check $CHANGED_FILES
36+ else
37+ echo "No Python files changed, skipping lint check."
38+ fi
39+
40+ - name : Run ruff format on changed files
41+ run : |
42+ CHANGED_FILES=$(git diff --name-only origin/main -- '*.py')
43+ if [ -n "$CHANGED_FILES" ]; then
44+ uvx ruff format $CHANGED_FILES
45+ else
46+ echo "No Python files changed, skipping format."
47+ fi
You can’t perform that action at this time.
0 commit comments