Skip to main content

ts: switch to ty for type checking

ID
8d757ca
date
2026-04-11 20:07:42+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
97d29ef
message
ts: switch to ty for type checking
changed files
1 file, 14 additions, 15 deletions

Changed files

ts (2467) → ts (2468)

diff --git a/ts b/ts
index 4a9d59a..641af8e 100755
--- a/ts
+++ b/ts
@@ -12,14 +12,13 @@ function run_python_tests() {
         return 0
     fi
 
-    # Run ruff to do Python formatting
-    print_info "-> ruff check --fix"
-    ruff check --fix .
+    print_info "-> ruff format"
+    ruff format .
 
     echo ""
 
-    print_info "-> ruff format"
-    ruff format .
+    print_info "-> ruff check --fix"
+    ruff check --fix .
 
     echo ""
 
@@ -38,24 +37,24 @@ function run_python_tests() {
     # the code into `src`, but for now I have to remember to look at *.py
     if [[ "$REPO_NAME" = "library-lookup" ]]
     then
-        print_info '-> mypy *.py src tests'
-        mypy *.py src tests
+        print_info '-> ty check *.py src tests'
+        ty check *.py src tests
     elif [[ "$REPO_NAME" = "prep_for_itunes" ]]
     then
-        print_info '-> mypy *.py'
-        mypy *.py
+        print_info '-> ty check *.py'
+        ty check *.py
     elif [[ "$REPO_NAME" = "yt-dlp_alexwlchan" ]]
     then
-        print_info '-> mypy *.py'
-        mypy *.py
+        print_info '-> ty check *.py'
+        ty check *.py
     else
-        print_info '-> mypy src tests'
+        print_info '-> ty check src tests'
 
-        if mypy src tests >/dev/null
+        if ty check src tests >/dev/null
         then
-            mypy src tests --no-color-output
+            ty check src tests --no-color-output
         else
-            mypy src tests
+            ty check src tests
         fi
     fi