Skip to content

Commit a9b7da5

Browse files
committed
fix ruff
1 parent 12ec1d4 commit a9b7da5

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

tests/data/test_data_handler.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,10 @@ def test_few_shot_split(dataset):
250250

251251

252252
def _make_multiclass_mapping_with_oos(*, with_validation: bool) -> dict:
253-
in_domain = []
254253
# Ensure enough samples per class so stratified splitting doesn't fail.
255-
for i in range(50):
256-
in_domain.append({"utterance": f"c0_{i}", "label": 0})
257-
for i in range(50):
258-
in_domain.append({"utterance": f"c1_{i}", "label": 1})
254+
in_domain = [{"utterance": f"c0_{i}", "label": 0} for i in range(50)] + [
255+
{"utterance": f"c1_{i}", "label": 1} for i in range(50)
256+
]
259257

260258
oos = [{"utterance": f"oos_{i}"} for i in range(20)]
261259

0 commit comments

Comments
 (0)