[CI] Ignore ruff D209, rejoin the docstrings it split, and silence incompatible-rule warnings (#57212)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-16 10:57:24 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 1085b64425
commit 651a88c09a
693 changed files with 2088 additions and 4171 deletions
@@ -28,8 +28,7 @@ def fake_hw_layernorm(monkeypatch):
A `SimpleNamespace` stands in for the module: `importlib.import_module`
returns it from `sys.modules` and `getattr` resolves `RMSNorm`, while its
attributes are set at construction (no `ModuleType` attribute-set that mypy
rejects, no constant `setattr` that ruff rejects).
"""
rejects, no constant `setattr` that ruff rejects)."""
module = types.SimpleNamespace(RMSNorm=type("HwRMSNorm", (), {}))
monkeypatch.setitem(sys.modules, HW_MODULE, module)
return module
@@ -82,8 +81,7 @@ def test_act_and_mul_falls_back_for_unknown_activation(
@pytest.fixture(scope="module")
def tiny_llama_path(tmp_path_factory):
"""A randomly-initialized microscopic Llama saved to disk (with an ungated
tokenizer) so vLLM can load it like any local checkpoint.
"""
tokenizer) so vLLM can load it like any local checkpoint."""
from transformers import AutoTokenizer, LlamaConfig, LlamaForCausalLM
tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/llama-tokenizer")