Official Codebase of 3DCodeVerse
Python
bench/time_audit: ruff
gaoypeng64fe62636141
diff --git a/harness/bench/time_audit/calls.py b/harness/bench/time_audit/calls.pyindex fb4266e3..8adaf6b5 100644--- a/harness/bench/time_audit/calls.py+++ b/harness/bench/time_audit/calls.py@@ -7,7 +7,6 @@ import reimport sysfrom collections import Counter, defaultdictfrom pathlib import Path-from typing import Anysys.path.insert(0, str(Path(__file__).parent))from corpus import RunRef, cost_rows, discover, fmt, med_p90, trajectories # noqa: E402diff --git a/harness/bench/time_audit/keys.py b/harness/bench/time_audit/keys.pyindex 6600a19e..64cc9f10 100644--- a/harness/bench/time_audit/keys.py+++ b/harness/bench/time_audit/keys.py@@ -11,6 +11,8 @@ from collections import Counterfrom pathlib import Pathsys.path.insert(0, str(Path(__file__).parent))+import contextlib+from corpus import discover, read_jsonl # noqa: E402KEYLIKE = re.compile(r"key|api_key|credential", re.I)@@ -44,10 +46,8 @@ def main() -> None:for row in read_jsonl(p):walk(row, p.name, found)else:- try:+ with contextlib.suppress(json.JSONDecodeError):walk(json.loads(text), p.name, found)- except json.JSONDecodeError:- passprint(f"scanned {files} files; '\"key\": \"…xxxx\"' occurrences: {redacted}")print("key-like field names found (name -> count):")for k, v in found.most_common(20):diff --git a/harness/bench/time_audit/stage_times.py b/harness/bench/time_audit/stage_times.pyindex 5349c1b1..3176f630 100644--- a/harness/bench/time_audit/stage_times.py+++ b/harness/bench/time_audit/stage_times.py@@ -91,7 +91,7 @@ def analyse(ref: RunRef) -> dict[str, Any]:build.append(b)gates.append(s["gates_t"] - s["last_build"])r = rd.get(s["round"], {})- rnd = float(((r.get("renders") or {}).get("duration_ms") or 0)) / 1000+ rnd = float((r.get("renders") or {}).get("duration_ms") or 0) / 1000render.append(rnd)j = s.get("judge_s", 0.0)judge.append(j)diff --git a/harness/bench/time_audit/storm_attempts.py b/harness/bench/time_audit/storm_attempts.pyindex a8c1158b..601d947a 100644--- a/harness/bench/time_audit/storm_attempts.py+++ b/harness/bench/time_audit/storm_attempts.py@@ -10,7 +10,7 @@ from collections import Counterfrom pathlib import Pathsys.path.insert(0, str(Path(__file__).parent))-from corpus import RunRef, discover, fmt, med_p90, trajectories # noqa: E402+from corpus import discover, fmt, med_p90, trajectories # noqa: E402from turns import parse_turns # noqa: E402STORM_RE = re.compile(r"gemini (\S+) capacity storm (\d+)/60 .*; waiting (\d+)s")