Colorise mypy output if there are failures
- ID
3b4c990- date
2025-04-23 13:50:10+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
4c36d78- message
Colorise mypy output if there are failures- changed files
1 file, 8 additions, 2 deletions
Changed files
ts (1672) → ts (1752)
diff --git a/ts b/ts
index c36b7bc..80c2e25 100755
--- a/ts
+++ b/ts
@@ -38,10 +38,16 @@ function run_python_tests() {
if [[ "$(pwd)" == ~/repos/library-lookup ]]
then
print_info '-> mypy *.py src tests'
- mypy *.py src tests --no-color-output
+ mypy *.py src tests
else
print_info '-> mypy src tests'
- mypy src tests --no-color-output
+
+ if mypy src tests >/dev/null
+ then
+ mypy src tests --no-color-output
+ else
+ mypy src tests
+ fi
fi
echo ""