mirror of
https://github.com/astral-sh/uv
synced 2026-01-20 21:10:10 -05:00
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:
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user