Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/eval/_ast_equiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _has_tree_sitter() -> bool:
path independently of the host environment.
"""
try:
import tree_sitter # type: ignore[import-not-found] # noqa: F401
import tree_sitter # noqa: F401

return True
except ImportError:
Expand Down
7 changes: 5 additions & 2 deletions tests/eval/unit/test_r2_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import pytest
import yaml
from pydantic import ValidationError
from pytest_mock import MockerFixture

from scripts.eval._schemas import SampleMeta

Expand Down Expand Up @@ -60,7 +61,7 @@ def test_TB_U_07_tier_below_range_rejected() -> None:
assert "greater_than_equal" in str(exc.value) or ">=" in str(exc.value)


def test_TB_U_04_from_merge_ref_derivation(mocker) -> None:
def test_TB_U_04_from_merge_ref_derivation(mocker: MockerFixture) -> None:
"""Mock subprocess.run to verify the 4-ref derivation rule:

base = git merge-base ^1 ^2
Expand All @@ -71,7 +72,9 @@ def test_TB_U_04_from_merge_ref_derivation(mocker) -> None:
(sample_import.py:11-21 docstring contract; locks v1 [plan] §C1)
"""

def fake_git_run(cmd, **kwargs):
def fake_git_run(
cmd: list[str] | str, **kwargs: object
) -> subprocess.CompletedProcess[str]:
args = cmd if isinstance(cmd, list) else cmd.split()
verb_idx = next(i for i, a in enumerate(args) if a == "git") + 3
verb = args[verb_idx]
Expand Down
8 changes: 6 additions & 2 deletions tests/eval/unit/test_r2_sha_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
import json
from pathlib import Path

import pytest

from tests.eval.manifests import _r2_sha


def test_TB_U_05_lock_round_trip_matches_disk(tmp_path) -> None:
def test_TB_U_05_lock_round_trip_matches_disk(tmp_path: Path) -> None:
"""Build lock entries, write them, then re-verify — must report match."""
# use real on-disk samples; manifest may live in tmp_path so we don't
# disturb the committed lock.
Expand All @@ -30,7 +32,9 @@ def test_TB_U_05_lock_round_trip_matches_disk(tmp_path) -> None:
assert rc_verify == 0


def test_TB_U_08_tampered_sample_reports_mismatch(tmp_path, capsys) -> None:
def test_TB_U_08_tampered_sample_reports_mismatch(
tmp_path: Path, capsys: pytest.CaptureFixture[str]
) -> None:
"""Copy r2-0001 to tmp, tamper meta.yaml, lock then alter — verify fails."""
repo_root = Path(__file__).resolve().parents[3]
src = repo_root / "tests" / "eval" / "datasets" / "r2" / "samples"
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_cleanup_residue.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_docs_no_no_tui_except_deprecation_note() -> None:

Scanned: CLAUDE.md, README*.md, doc/*.md (recursive).
Excluded:
- doc/web-ui-redesign-handoff.md — frozen historical record
- doc/modules/web-ui-redesign-handoff.md — frozen historical record
- doc/test-report/** — historical test reports
- docs/web-ui-redesign-tests.md — test matrix references --no-tui for
historical context (location pointer for the cleanup)
Expand All @@ -90,7 +90,7 @@ def test_docs_no_no_tui_except_deprecation_note() -> None:
candidates.append(path)

excluded_paths = {
REPO_ROOT / "doc" / "web-ui-redesign-handoff.md",
REPO_ROOT / "doc" / "modules" / "web-ui-redesign-handoff.md",
REPO_ROOT / "docs" / "web-ui-redesign-tests.md",
}
for doc_root in (REPO_ROOT / "doc", REPO_ROOT / "docs"):
Expand Down
Loading