Skip to content

Commit c4a47d1

Browse files
committed
[ty] Strip hyperlinks from mypy_primer diffs
1 parent 192c37d commit c4a47d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/mypy_primer.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
- name: Run mypy_primer
5656
env:
5757
PRIMER_SELECTOR: crates/ty_python_semantic/resources/primer/good.txt
58+
CLICOLOR_FORCE: "1"
5859
DIFF_FILE: mypy_primer.diff
5960
run: |
6061
cd ruff

scripts/mypy_primer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cd ..
2020
echo "Project selector: ${PRIMER_SELECTOR}"
2121
# Allow the exit code to be 0 or 1, only fail for actual mypy_primer crashes/bugs
2222
uvx \
23-
--from="git+https://github.com/hauntsaninja/mypy_primer@ab5d30e2d4ecdaf7d6cc89395c7130143d6d3c82" \
23+
--from="git+https://github.com/hauntsaninja/mypy_primer@a81360123447a9409ab72f6b4f9684c02a9768e7" \
2424
mypy_primer \
2525
--repo ruff \
2626
--type-checker ty \
@@ -34,5 +34,5 @@ uvx \
3434
# Output diff with ANSI color codes
3535
cat "${DIFF_FILE}"
3636

37-
# Remove ANSI color codes before uploading
38-
sed -ie 's/\x1b\[[0-9;]*m//g' "${DIFF_FILE}"
37+
# Remove ANSI color codes and ANSI hyperlinks before uploading
38+
sed -ie 's/\x1b\[[0-9;]*m//g; s/\x1b]8;;[^\x1b]*\x1b\\//g' "${DIFF_FILE}"

0 commit comments

Comments
 (0)