@@ -33,38 +33,38 @@ jobs:
3333 git checkout origin/main
3434
3535 git checkout ${{ github.sha }} -- pyproject.toml
36-
36+
3737 # Install dependencies for main
3838 uv venv .venv
3939 source .venv/bin/activate
4040 uv sync --all-extras
41-
41+
4242 # Run mypy, filter for errors only, remove line numbers (file:123: -> file::), and sort
4343 # We ignore exit code (|| true) because we expect errors on main
4444 uv run mypy . | grep "error:" | sed 's/:\([0-9]\+\):/::/g' | sort > main_errors.txt || true
45-
45+
4646 echo "Found $(wc -l < main_errors.txt) errors on main."
4747
4848 - name : Check PR Branch
4949 run : |
5050 # Switch back to the PR commit
5151 git checkout ${{ github.sha }}
52-
52+
5353 # Re-sync dependencies in case the PR changed them
5454 source .venv/bin/activate
5555 uv sync --all-extras
56-
56+
5757 # Run mypy on PR code, apply same processing
5858 uv run mypy . | grep "error:" | sed 's/:\([0-9]\+\):/::/g' | sort > pr_errors.txt || true
59-
59+
6060 echo "Found $(wc -l < pr_errors.txt) errors on PR branch."
6161
6262 - name : Compare and Fail on New Errors
6363 run : |
64- # 'comm -13' suppresses unique lines in file1 (main) and common lines,
64+ # 'comm -13' suppresses unique lines in file1 (main) and common lines,
6565 # leaving only lines unique to file2 (PR) -> The new errors.
6666 comm -13 main_errors.txt pr_errors.txt > new_errors.txt
67-
67+
6868 if [ -s new_errors.txt ]; then
6969 echo "::error::The following NEW mypy errors were introduced:"
7070 cat new_errors.txt
0 commit comments