Add mypy type check for uv-python scripts (#5332)

## Summary

Per https://github.com/astral-sh/uv/pull/4853#issuecomment-2212505407

> If we're going to aim for full type coverage, we should probably
follow this by adding type checking in CI too otherwise it seems too
easy for it to become out of date.
This commit is contained in:
Jo
2024-07-23 22:14:05 +08:00
committed by GitHub
parent 025f2f3162
commit 43084249ee
4 changed files with 35 additions and 17 deletions

View File

@@ -59,14 +59,27 @@ jobs:
- name: "Prettier"
run: npx prettier --check "**/*.{json5,yaml,yml}"
- name: "README check"
run: python scripts/transform_readme.py --target pypi
python-lint:
name: "Python lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: "Ruff format"
run: pipx run ruff format --diff .
- name: "Ruff check"
run: pipx run ruff check .
- name: "README check"
run: python scripts/transform_readme.py --target pypi
- name: "Mypy check"
run: pipx run --python 3.12 mypy
cargo-clippy:
needs: determine_changes