chore: make it more concise

This commit is contained in:
Mateo Wang 2026-08-15 16:41:00 -07:00 committed by GitHub
parent c9697cbce5
commit 082469ff3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ When you fix violations gated by `ruff-strict-budget.json`, `type-discipline-bud
`make check` (f.k.a. `make pre-commit`, which still works identically as an alias) saves its complete output to a log file in .git (overwriting previous logs) and prints that path as its first and last output lines. To inspect a run, read or grep that log instead of re-running the multi-minute checks just to see a different slice
`make check`, `make lint`, `scripts/pre_commit_lint.sh`, and the standalone budget gates (`scripts/ruff_strict_gate.py`, `scripts/type_discipline_gate.py`, `scripts/type_check_gate.py`) each hold one of `LITELLM_GATE_SLOTS` machine-wide slots (default 2, see `scripts/gate_slot_lock.py`), so when other sessions or worktrees on the same box are already running heavy work, yours prints "all N machine-wide slots are busy; queueing" and then stays quiet until a slot frees. Queueing is expected, so give the command a long timeout and let it wait rather than killing it, retrying it, or assuming it hung. Don't defeat the queue by setting `LITELLM_GATE_SLOTS=0` or raising the slot count, and don't fan heavy targets out into parallel shells, since they'd only queue behind each other anyway. Prefer top-level `make check` / `make lint` over `check-inner` / `lint-inner`: the inner targets are still slot-aware, but they take a slot per nested gate over the run instead of one slot for the whole thing
`make check`, `make lint`, `scripts/pre_commit_lint.sh`, and the standalone budget gates (`scripts/ruff_strict_gate.py`, `scripts/type_discipline_gate.py`, `scripts/type_check_gate.py`) each hold one of 2 machine-wide slots, so when other sessions or worktrees on the same box are already running heavy work, yours prints "all N machine-wide slots are busy; queueing" and then stays quiet until a slot frees. Give the command a long timeout and let it wait rather than killing it, retrying it, or assuming it hung. Don't change the # of machine-wide slots or make it unlimited by setting `LITELLM_GATE_SLOTS=0`
If you're trying to create a new function that relies on untyped stuff, instead of adding more Any's and pushing `reportAny` / `reportExplicitAny` closer to their basedpyright ceilings, just validate it in the caller with Pydantic (a model or `TypeAdapter` that returns the typed thing or raises will do) and then pass the now typed variable in