Skip to content

Commit 33cedaa

Browse files
committed
cleanup
1 parent e629c55 commit 33cedaa

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

py/scripts/check-session-weights.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
def update_weights(weights_path: Path, weights_data: dict, measured: dict[str, int]) -> None:
3636
"""Overwrite session-weights.json with measured durations."""
3737
meta_keys = {k for k in weights_data if k.startswith("_")}
38-
# Start with metadata keys
3938
updated = {k: weights_data[k] for k in sorted(meta_keys)}
4039
# Merge: keep measured values, drop sessions that no longer exist
4140
all_sessions = sorted(set(weights_data.keys() - meta_keys) | set(measured.keys()))
@@ -89,7 +88,6 @@ def main() -> None:
8988
update_weights(args.weights, weights_data, measured)
9089
return
9190

92-
default_weight = weights_data.get("_default", 15)
9391
meta_keys = {k for k in weights_data if k.startswith("_")}
9492

9593
drifted: list[str] = []

py/scripts/nox-matrix.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def assign_shards(
5252
default_weight: int,
5353
) -> list[list[str]]:
5454
"""Assign sessions to shards using greedy LPT bin-packing."""
55-
# Sort by weight descending
5655
weighted = [(s, weights.get(s, default_weight)) for s in sessions]
5756
weighted.sort(key=lambda x: -x[1])
5857

@@ -64,7 +63,6 @@ def assign_shards(
6463
shard_assignments[lightest].append(name)
6564
shard_totals[lightest] += weight
6665

67-
# Print summary to stderr
6866
for i in range(total_shards):
6967
count = len(shard_assignments[i])
7068
total = shard_totals[i]
@@ -131,7 +129,6 @@ def main() -> None:
131129
print("\n".join(other_sessions))
132130
return
133131

134-
# Run nox with the assigned sessions
135132
cmd = ["nox", "-f", str(noxfile), "-s", *my_sessions]
136133

137134
if args.output_durations is None:

0 commit comments

Comments
 (0)