Skip to content

deps-dev: bump ruff from 0.16.8 to 0.16.9 in the lint-tools group #455

deps-dev: bump ruff from 0.16.8 to 0.16.9 in the lint-tools group

deps-dev: bump ruff from 0.16.8 to 0.16.9 in the lint-tools group #455

Workflow file for this run

name: pre-commit
on:
pull_request:
push:
branches: [master, main]
permissions:
contents: read
jobs:
# The job id is the required status check "pre-commit" on main; keep it.
#
# These steps do what pre-commit/action v3.0.1 does, written out: its last
# release pins actions/cache@v4, which targets the deprecated Node 20
# runtime, and it has had no release since. pre-commit itself comes from
# uv.lock rather than a pip install.
pre-commit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
id: setup-uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version-file: "uv.lock"
python-version: "3.11"
enable-cache: true
# Hook environments, keyed on the config that defines them and on the
# Python they were built with, since a hook venv does not survive an
# interpreter change. This is the cache pre-commit/action used to provide.
- name: Cache pre-commit hook environments
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pre-commit
key: >-
pre-commit-${{ runner.os }}-py${{ steps.setup-uv.outputs.python-version }}-${{
hashFiles('.pre-commit-config.yaml') }}
# pre-commit itself comes from the locked dev group. The ruff, mypy and
# typos hooks are `repo: local` and run through `uv run --locked`, which
# syncs .venv to the default groups first: the project, its dependencies
# (pydantic 2) and the dev tools, so mypy checks against the SDK's real
# dependencies.
- name: Run pre-commit
run: >-
uv run --locked
pre-commit run --all-files --show-diff-on-failure --color=always
# The SDK imports pydantic differently per major, so its types are checked
# against pydantic 1 as well (the hook above ran against pydantic 2).
- name: Type-check against pydantic 1
run: uv run --locked --group pydantic-v1 mypy