scripts: switch to my standard test runner; ty for type checking
- ID
7524b51- date
2026-04-20 05:28:45+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
0b2a5f4- message
scripts: switch to my standard test runner; ty for type checking- changed files
5 files, 28 additions, 26 deletions
Changed files
.github/workflows/test.yml (720) → .github/workflows/test.yml (560)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1155965..18febb7 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,15 +28,5 @@ jobs:
- name: Install dependencies
run: pip install -r dev_requirements.txt
- - name: Check formatting
- run: |
- ruff check .
- ruff format --check .
-
- - name: Check types
- run: mypy src tests
-
- name: Run tests
- run: |
- coverage run -m pytest tests
- coverage report
+ run: bash scripts/run_javascript_data_files_tests.sh
dev_requirements.in (39) → dev_requirements.in (37)
diff --git a/dev_requirements.in b/dev_requirements.in
index 01556c1..c44d0c2 100644
--- a/dev_requirements.in
+++ b/dev_requirements.in
@@ -1,5 +1,5 @@
-e file:.[typed]
-mypy
pytest-cov
ruff
+ty
dev_requirements.txt (1011) → dev_requirements.txt (900)
diff --git a/dev_requirements.txt b/dev_requirements.txt
index 63d3d33..5b2d5e4 100644
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -8,16 +8,8 @@ coverage==7.13.5
# via pytest-cov
iniconfig==2.3.0
# via pytest
-librt==0.8.1
- # via mypy
-mypy==1.20.0
- # via -r dev_requirements.in
-mypy-extensions==1.1.0
- # via mypy
packaging==26.0
# via pytest
-pathspec==1.0.4
- # via mypy
pluggy==1.6.0
# via
# pytest
@@ -32,11 +24,12 @@ pytest==9.0.3
# via pytest-cov
pytest-cov==7.1.0
# via -r dev_requirements.in
-ruff==0.15.9
+ruff==0.15.10
+ # via -r dev_requirements.in
+ty==0.0.29
# via -r dev_requirements.in
typing-extensions==4.15.0
# via
- # mypy
# pydantic
# pydantic-core
# typing-inspection
pyproject.toml (1516) → pyproject.toml (1471)
diff --git a/pyproject.toml b/pyproject.toml
index 635978d..9c9b9e3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -51,10 +51,6 @@ fail_under = 100
[tool.pytest.ini_options]
filterwarnings = ["error"]
-[tool.mypy]
-mypy_path = "src"
-strict = true
-
[tool.ruff.lint]
select = ["D", "E", "F"]
ignore = [
scripts/run_javascript_data_files_tests.sh (0) → scripts/run_javascript_data_files_tests.sh (406)
diff --git a/scripts/run_javascript_data_files_tests.sh b/scripts/run_javascript_data_files_tests.sh
new file mode 100755
index 0000000..342d98c
--- /dev/null
+++ b/scripts/run_javascript_data_files_tests.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+
+# Print a command in blue, then run the command
+run_command() {
+ echo ""
+ echo -e "\033[34m-> $@\033[0m"
+ bash -c "$@"
+}
+
+run_command 'ruff format'
+
+if [[ "${CI:-}" == "true" ]]
+then
+ run_command 'git diff --exit-code'
+fi
+
+run_command 'ruff check'
+run_command 'ty check'
+run_command "coverage run -m pytest tests"
+run_command "coverage report"