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,8 +1,7 @@
"""
Tests for check_dataset_for_missing_videos (issue #5085).
"""Tests for check_dataset_for_missing_videos (issue #5085).
Fixtures extract the function from vision.py via AST so the pure-Python logic
tests run without the full unsloth import chain (triton/CUDA kernels).
Fixtures AST-extract the function from vision.py so logic tests run without
the full unsloth import chain (triton/CUDA kernels).
"""
import ast
@ -22,8 +21,7 @@ def _extract_fns_via_ast(
fn_names,
extra_ns = None,
):
"""Exec a set of top-level functions out of a .py file so intra-module
references between them resolve."""
"""Exec the named top-level functions from a .py file so their mutual references resolve."""
source = source_path.read_text(encoding = "utf-8")
tree = ast.parse(source, filename = str(source_path))
wanted = set(fn_names)