From 69cb311015524c7a16a8ab088913b16ded61e6b3 Mon Sep 17 00:00:00 2001 From: Tet-9 Date: Mon, 5 Oct 2026 09:06:19 +0100 Subject: [PATCH] Remove unused imports and variables --- evaluator/bot_engine.py | 1 - excore/frontier/__init__.py | 2 +- excore/frontier/plots.py | 2 +- tests/test_bot_engine.py | 6 ++---- tests/test_build_validate.py | 1 - tests/test_cli_plots_sources.py | 1 - tests/test_gates_rewards.py | 4 +--- tests/test_runtime_quantizer.py | 1 - tests/test_sandbox.py | 1 - 9 files changed, 5 insertions(+), 14 deletions(-) diff --git a/evaluator/bot_engine.py b/evaluator/bot_engine.py index 5973ab5..932806e 100644 --- a/evaluator/bot_engine.py +++ b/evaluator/bot_engine.py @@ -16,7 +16,6 @@ import os import re import subprocess -import sys import tempfile from dataclasses import dataclass from pathlib import Path diff --git a/excore/frontier/__init__.py b/excore/frontier/__init__.py index 87f2785..a92ea82 100644 --- a/excore/frontier/__init__.py +++ b/excore/frontier/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from dataclasses import dataclass, field +from dataclasses import dataclass from typing import Mapping, Sequence from .core_frontier import Assessment, Entry, Point, Space, Spectrum, make_point diff --git a/excore/frontier/plots.py b/excore/frontier/plots.py index 25514ad..8196cf2 100644 --- a/excore/frontier/plots.py +++ b/excore/frontier/plots.py @@ -11,7 +11,7 @@ from pathlib import Path from xml.sax.saxutils import escape -from .core_frontier import Entry, Spectrum +from .core_frontier import Spectrum W, H, ML, MR, MT, MB = 640, 420, 70, 24, 44, 56 BG, TEXT, SUBTLE = "#0a0c0f", "#e9ecf0", "#8a96a6" diff --git a/tests/test_bot_engine.py b/tests/test_bot_engine.py index 09e7242..f51aa44 100644 --- a/tests/test_bot_engine.py +++ b/tests/test_bot_engine.py @@ -1,10 +1,9 @@ import subprocess -from pathlib import Path import numpy as np import pytest -from evaluator.bot_engine import BotEngine, Git, classify_files, render_report +from evaluator.bot_engine import BotEngine, Git, classify_files from evaluator.github import ChangedFile, GitHubError, PullRequest from evaluator.runner import BaselinePerf, EvalBundle, EvalFailure from excore.eval.accuracy import AccuracyResult @@ -316,7 +315,7 @@ def pull(self): from evaluator.bot_engine import Override, apply_override, parse_override -from excore.frontier import RewardDecision, Verdict, judge +from excore.frontier import judge def merged_gh(**kw): @@ -438,7 +437,6 @@ def test_override_cannot_duplicate_or_conjure_an_entry(repo, tiny_cfg, tiny_spec out = engine(repo, tiny_cfg, FakeGH(labels=("excore-tier:Ultra",)), FakeRunner()).handle_pr(7) assert out.stage == "duplicate" empty = Spectrum("CPU-35B", Space.from_config(tiny_cfg)) - cand = Point("x", "x", 0.02, 1.2, 1.2, 14.0) v = judge(candidate_id="x", name="x", accuracy=acc(), perf=perf(), baseline_perf=BaselinePerf(10.0, 100.0, 20.0), guards=[], spectrum=empty, cfg=tiny_cfg) assert not v.accepted and apply_override(v, Override("core:XL", "l"), tiny_cfg) is v diff --git a/tests/test_build_validate.py b/tests/test_build_validate.py index 1fbf2f0..2f98d6c 100644 --- a/tests/test_build_validate.py +++ b/tests/test_build_validate.py @@ -1,5 +1,4 @@ import shutil -from pathlib import Path import numpy as np import pytest diff --git a/tests/test_cli_plots_sources.py b/tests/test_cli_plots_sources.py index e94c621..c38d0c0 100644 --- a/tests/test_cli_plots_sources.py +++ b/tests/test_cli_plots_sources.py @@ -198,6 +198,5 @@ def test_empty_spectrum_renders(cfg): def test_plots_cli(spectrum, tmp_path, tiny_config): sp_file = tmp_path / "spectrum.json" spectrum.save(sp_file) - cfg = yaml.safe_load(Path(tiny_config).read_text()) assert main(["plots", "--spectrum", str(sp_file), "--out-dir", str(tmp_path / "out")]) == 0 assert len(list((tmp_path / "out").glob("*.svg"))) == 3 diff --git a/tests/test_gates_rewards.py b/tests/test_gates_rewards.py index 9cc0f2b..2efcd01 100644 --- a/tests/test_gates_rewards.py +++ b/tests/test_gates_rewards.py @@ -1,9 +1,7 @@ -import re - import numpy as np import pytest -from synthetic import Leaky, SyntheticBackend +from synthetic import Leaky from excore.eval.accuracy import AccuracyResult from excore.eval.performance import PerfResult, PerfRun diff --git a/tests/test_runtime_quantizer.py b/tests/test_runtime_quantizer.py index 8ecc766..46ccc3b 100644 --- a/tests/test_runtime_quantizer.py +++ b/tests/test_runtime_quantizer.py @@ -1,4 +1,3 @@ -import os import stat import sys from pathlib import Path diff --git a/tests/test_sandbox.py b/tests/test_sandbox.py index e7c15c9..24df4e7 100644 --- a/tests/test_sandbox.py +++ b/tests/test_sandbox.py @@ -1,4 +1,3 @@ -import os import sys import time from pathlib import Path