Skip to content

Commit beb66dd

Browse files
committed
Fix ruff issues
1 parent 3ec3aae commit beb66dd

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

codeclash/analysis/llm_as_judge/action_categories_by_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
gap = 0.3
133133
y_positions = []
134134
model_positions = []
135-
for i, model in enumerate(models):
135+
for i in range(len(models)):
136136
base = i * (2 + gap)
137137
y_positions.extend([base, base + 1])
138138
model_positions.append(base + 0.5)
@@ -197,7 +197,7 @@
197197
)
198198

199199
# Add round labels on the left side of the plot
200-
for i, (y_late, y_early) in enumerate(zip(y_positions[::2], y_positions[1::2])):
200+
for y_late, y_early in zip(y_positions[::2], y_positions[1::2]):
201201
ax.text(-0.2, y_late, "round ≥8", fontsize=11, ha="right", va="center", color="gray", fontproperties=FONT_BOLD)
202202
ax.text(-0.2, y_early, "round ≤7", fontsize=11, ha="right", va="center", color="gray", fontproperties=FONT_BOLD)
203203

codeclash/analysis/llm_as_judge/big_questions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import re
77
from concurrent.futures import ThreadPoolExecutor, as_completed
88
from pathlib import Path
9-
from typing import Literal
9+
from typing import Any, Literal
1010

1111
import jinja2
1212
import yaml
@@ -23,7 +23,6 @@
2323
stop_after_attempt,
2424
wait_exponential,
2525
)
26-
from typing_extensions import Any
2726

2827
from codeclash.analysis.llm_as_judge.utils import FileLock, Instance, InstanceBatch, get_instances
2928
from codeclash.utils.log import get_logger

codeclash/analysis/llm_as_judge/visualize.ipynb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
gap = 0.3
281281
y_positions = []
282282
model_positions = []
283-
for i, model in enumerate(models):
283+
for i in range(len(models)):
284284
base = i * (2 + gap)
285285
y_positions.extend([base, base + 1])
286286
model_positions.append(base + 0.5)
@@ -340,7 +340,7 @@
340340
left = [left[i] + values[i] for i in range(len(y_positions))]
341341

342342
# Add round labels on the right side of the plot
343-
for i, (y_late, y_early) in enumerate(zip(y_positions[::2], y_positions[1::2])):
343+
for y_late, y_early in zip(y_positions[::2], y_positions[1::2]):
344344
ax.text(-2, y_late, "round ≥8", fontsize=9, ha="right", va="center", color="gray")
345345
ax.text(-2, y_early, "round ≤7", fontsize=9, ha="right", va="center", color="gray")
346346

0 commit comments

Comments
 (0)