ci: enhance type checking in workflow and improve test coverage

- Added a step to fail the CI if any '# type: ignore' comments are found in Python files.
- Refactored tests to use mocking for better isolation and reliability.
- Updated type hints and casting in several files to improve type safety.
This commit is contained in:
Alishahryar1 2026-02-14 23:01:11 -08:00
parent 97217debfa
commit 0d292cd578
6 changed files with 41 additions and 12 deletions

View file

@ -33,6 +33,14 @@ jobs:
- name: Type check
run: uv run ty check
- name: Fail on type: ignore (no suppressions allowed)
run: |
if grep -rE '# type: ignore|# ty: ignore' --include='*.py' . --exclude-dir=.venv --exclude-dir=.git; then
echo "::error::type: ignore / ty: ignore comments are not allowed. Fix the underlying type errors instead."
exit 1
fi
exit 0
- name: Format
run: uv run ruff format