Skip to content

Commit 35dc57c

Browse files
committed
docs: explain best-effort stream reconfigure in validate_scores
Address github-code-quality review: the except (AttributeError, ValueError) guard around stream reconfigure was an undocumented empty swallow. Add a comment noting it is best-effort (wrapped streams such as pytest's capture object do not support reconfigure). No functional change.
1 parent afdd9a4 commit 35dc57c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

utils/evals/validate_scores.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ def main() -> int:
200200
try:
201201
_stream.reconfigure(line_buffering=True)
202202
except (AttributeError, ValueError):
203+
# Best-effort only: some wrapped streams (e.g. pytest's capture
204+
# object) don't support reconfigure; leave their buffering as-is.
203205
pass
204206

205207
parser = argparse.ArgumentParser(description="Validate eval scores")

0 commit comments

Comments
 (0)