inspect-evals-lint
Static checks for Inspect AI evaluations: file structure, test coverage conventions, best practices and sandbox image pinning.
These checks began life as the autolint tool inside inspect_evals. They are packaged here so any repository of Inspect evaluations can run the same checks, including standalone repos built from the inspect-evals-template and submitted to the inspect_evals register.
Nothing is imported or executed from the evaluation being checked. Every check is static analysis over Python source (via ast), eval.yaml, compose files and pyproject.toml.
Install
uv add --dev inspect-evals-lint
# or
pip install inspect-evals-lint
Usage
inspect-evals-lint <eval_name> # one evaluation
inspect-evals-lint --all-evals # every evaluation in the repo
inspect-evals-lint --all-evals --summary-only
inspect-evals-lint --check-summary # per-check compliance across evals
inspect-evals-lint <eval_name> --check registry
inspect-evals-lint --all-evals --json > lint.json
inspect-evals-lint --list-checks
--json writes one document to stdout and sends progress to stderr, so the output can be piped straight into other tooling. It carries passed, run-wide summary counts and, per evaluation, every check's status, category (the CHECKS.md section: file_structure, code_quality, tests or best_practices), message, file (relative to the repository root when possible) and line.
The repository root is the nearest pyproject.toml carrying a [tool.inspect-evals-lint] table (falling back to the nearest pyproject.toml, then the current directory). Pass --root to override.
Exit codes: 0 all checks passed (warnings, skips and suppressions count as passing), 1 at least one check failed, 2 usage or configuration error.
Configuration
Configuration lives in pyproject.toml. Pick a layout preset and override any field:
[tool.inspect-evals-lint]
preset = "template" # or "monorepo" / "register"
| Key | template preset |
monorepo preset |
register preset |
Meaning |
|---|---|---|---|---|
source-root |
src |
src/inspect_evals |
src |
Directory with one sub-directory per evaluation |
tests-root |
tests |
tests |
tests |
Directory holding <tests-root>/<eval>/ |
tests-layout |
per-eval |
per-eval |
flat |
flat also accepts test files directly under tests-root when <tests-root>/<eval>/ is absent |
readme-location |
eval-dir |
eval-dir |
repo-root |
repo-root also accepts the repository's top-level README.md |
eval-yaml-required |
true |
true |
false |
Whether a missing eval.yaml fails (a present one is always validated) |
import-prefix |
"" |
inspect_evals |
"" |
Dotted prefix evaluations import under |
registry |
entry-points |
module |
entry-points |
entry-points reads [project.entry-points.inspect_ai]; module greps a registry module; none skips |
registry-module |
unset | src/inspect_evals/_registry.py |
unset | Required when registry = "module" |
non-eval-dirs |
["utils", "examples"] |
["utils"] |
same as template | Sub-directories of source-root that are not evaluations |
eval-yaml-required-fields |
title, description, group, contributors, tasks |
same | same | Keys every eval.yaml must define |
isolated-packages-dir |
unset | packages |
unset | Per-eval pyproject.toml directory for isolated dependency sets |
disabled-checks |
[] |
[] |
[] |
Checks that never run |
sandbox-image-allowlist |
{} |
{} |
{} |
{ eval = ["image/ref"] } pairs allowed to stay unpinned (warn, not fail) |
model-role-allowlist |
{} |
{} |
{} |
{ eval = ["role"] } pairs whose get_model(role=...) may lack a deliberate resolution (warn, not fail) |
Without a [tool.inspect-evals-lint] table the template preset is used. --preset overrides the table for one run.
The register preset is for an upstream repository listed in the inspect_evals register: one evaluation, tests directly under tests/, the README at the repository root, and metadata held by the register entry rather than an eval.yaml in the repo. Run it from outside the repo with inspect-evals-lint --root <clone> --preset register --all-evals --json.
Suppressing a check
- Line:
# noautolint: <check_name>on the offending line (checks that report per-site results:private_api_imports,get_model_location). - File:
# noautolint-file: <check_name>within the first ten lines of a file. - Directory: a
.noautolintfile in a sub-directory listing check names, one per line. Files under that directory are also excluded from AST-based checks. - Evaluation: a
.noautolintfile in the evaluation directory listing check names.
Checks
See docs/CHECKS.md for the full list with the reasoning behind each check.
Python API
from pathlib import Path
from inspect_evals_lint import lint_evaluation, load_config, get_all_eval_names
root = Path(".")
config = load_config(root)
for name in get_all_eval_names(root, config):
report = lint_evaluation(root, name, config)
print(name, report.passed(), report.summary())
Development
uv sync
uv run pre-commit install # optional: run the lint stack on every commit
uv run pytest
uv run basedpyright src
Linting (ruff, zizmor, mdformat) runs via pre-commit; CI runs the same stack plus basedpyright and pytest via the shared python-ci reusable workflow.
Releasing
See RELEASING.md.
Release files for inspect-evals-lint 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inspect_evals_lint-0.1.1.tar.gz | 84.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inspect_evals_lint-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 121.9 kB
Release files / inspect_evals_lint-0.1.1.tar.gz
| Download URL | inspect_evals_lint-0.1.1.tar.gz |
|---|---|
| Size | 84.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cb0bb87307b57a3eaa389c7c72dde0adb782f91924463ea808c3369159509d8
|
|
BLAKE2b-256 checksum How to use checksums |
7c3fa4c43ecbd595ae51779ea51a82ae5cb5f692e719abd232bca8544f601e8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / inspect_evals_lint-0.1.1-py3-none-any.whl
| Download URL | inspect_evals_lint-0.1.1-py3-none-any.whl |
|---|---|
| Size | 37.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eccc3a2542b4571882b17a689e5ee4e90df7c2ba4d7ba599e104a9f28fb864f6
|
|
BLAKE2b-256 checksum How to use checksums |
268336e1fc451f90df2a295fcdcd1b041a908bd8b389be89f63c2ffd76d98107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log