Reduce and tighten comments and docstrings across the test suite (#6429)

* Reduce and tighten comments and docstrings in tests

Shorten verbose comments and docstrings across the test suite without
changing any test logic. Remove narration that restates the next line,
collapse long module and test docstrings to a single line, and drop banner
separators. Keep regression context (issue and PR references, run ids),
skip reasons, mocking and timing rationale, license headers, lint and type
directives, and commented-out code.

Comments and docstrings only: an AST signature check confirms no code,
assertions, or string literals changed, and the suite byte-compiles cleanly.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Daniel Han 2026-06-18 01:07:09 -07:00 committed by GitHub
commit a6dc10dad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
122 changed files with 1847 additions and 4511 deletions

View file

@ -1,12 +1,8 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved.
"""Regression tests: _patch_trl_rl_trainers must never raise.
The wrapper in unsloth/models/rl.py ring-fences the impl so direct
callers (CI shims, downstream tools) don't have to. Lock that
contract here.
"""
"""Regression: _patch_trl_rl_trainers (the ring-fencing wrapper in
unsloth/models/rl.py) must never raise."""
from __future__ import annotations
@ -39,7 +35,7 @@ def test_patch_trl_rl_trainers_swallows_garbage_input():
def test_impl_is_separately_exposed():
# Power users can still call the impl directly for the raising path.
# The impl stays directly callable for the raising path.
_wrapper, impl = _import_helpers()
assert callable(impl)