The pyright job in `format.yaml` previously installed only `--extra daily --extra tracing`. That was sufficient when most optional-dep- using files were in the pyright ignore list, but as this PR has cleared dozens of files, those files now reference symbols from optional-dep modules (`aiortc.RTCIceServer` via `IceServer`, `google.genai.types.HttpOptions`, etc.). `reportMissingImports: false` tolerates the failed imports themselves, but the imported names become `Unknown` and using them as type expressions trips `reportInvalidTypeForm` / `reportAttributeAccessIssue` — errors that aren't gated by that flag. Switch to `--all-extras --no-extra gstreamer --no-extra local` (matching the dev setup in README.md), so pyright sees the same dependency set the code is intended to be type-checked against and the install-set scales naturally as more files leave the ignore list. Also reconcile CLAUDE.md's setup command, which only excluded `gstreamer`. README.md is canonical and additionally excludes `local` (pyaudio requires `portaudio` native libs that aren't installed by default on a clean Ubuntu CI runner).
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: format
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
paths-ignore:
|
|
- "docs/**"
|
|
|
|
concurrency:
|
|
group: build-format-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
ruff-format:
|
|
name: "Code quality checks"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install development dependencies
|
|
# `--all-extras` (matching the dev setup in README.md) so pyright can
|
|
# resolve types from various optional dependencies.
|
|
run: uv sync --group dev --all-extras --no-extra gstreamer --no-extra local
|
|
|
|
- name: Ruff formatter
|
|
id: ruff-format
|
|
run: uv run ruff format --diff
|
|
|
|
- name: Ruff linter (all rules)
|
|
id: ruff-check
|
|
run: uv run ruff check
|
|
|
|
- name: Type check (pyright)
|
|
id: pyright
|
|
run: uv run pyright
|