[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
@@ -131,8 +131,7 @@ class TestBackupTokenAsyncSpec:
def test_buggy_code_was_always_off_by_one(self):
"""The original code used seq_len as index, which is always one past
the end of output_token_ids even without async inflation.
"""
the end of output_token_ids even without async inflation."""
req_ids = ["r0"]
requests = {"r0": _FakeRequest([0, 1, 2], [1000, 1001])}
batch = _FakeInputBatch(req_ids, [5])
@@ -105,8 +105,7 @@ def test_build_draft_attn_metadata_sets_seq_lens_cpu_upper_bound():
"""The fix: every per-step ``CommonAttentionMetadata`` carries a non-None
``seq_lens_cpu_upper_bound`` derived from the target-side upper bound plus
the current draft-step offset. Padded entries are zeroed (matching the
main model runner's convention).
"""
main model runner's convention)."""
fake = _make_fake_speculator()
base = torch.tensor([100, 200, 300, 0], dtype=torch.int32)
@@ -127,8 +126,7 @@ def test_build_draft_attn_metadata_sets_seq_lens_cpu_upper_bound():
def test_build_draft_attn_metadata_zeroes_padded_upper_bound_tail():
"""The padded tail of the upper-bound tensor is zeroed, so it stays a
valid tensor of length ``num_reqs_padded`` regardless of padding.
"""
valid tensor of length ``num_reqs_padded`` regardless of padding."""
fake = _make_fake_speculator()
base = torch.zeros(2, dtype=torch.int32)
@@ -143,8 +141,7 @@ def test_build_draft_attn_metadata_zeroes_padded_upper_bound_tail():
def test_build_draft_attn_metadata_clamps_to_max_model_len():
"""The per-request upper bound (target bound + step) is clamped to the
model length so it never exceeds the allocated KV range.
"""
model length so it never exceeds the allocated KV range."""
fake = _make_fake_speculator(max_model_len=1024)
base = torch.tensor([1023, 500], dtype=torch.int32)
@@ -132,8 +132,7 @@ def test_eagle_step_slot_mapping_kernel_exceeds_max():
def test_eagle_step_slot_mapping_kernel_cudagraph_padding():
"""Test that padding threads write PADDING_SLOT_ID when
input_batch_size > batch_size (cudagraph padding).
"""
input_batch_size > batch_size (cudagraph padding)."""
device = torch.device(DEVICE_TYPE)
batch_size = 4
input_batch_size = 8
@@ -69,8 +69,7 @@ def _make_kv_cache_config(layer_names: set[str]) -> SimpleNamespace:
def test_block_size_uses_kernel_block_size(monkeypatch: pytest.MonkeyPatch):
"""The proposer's slot-mapping math runs against the kernel-granularity
block table, so block_size must come from kernel_block_sizes.
"""
block table, so block_size must come from kernel_block_sizes."""
layer_names = {"draft.0.self_attn.attn"}
proposer = _make_proposer(monkeypatch, layer_names)
@@ -98,8 +97,7 @@ def test_block_size_falls_back_to_kv_cache_spec(monkeypatch: pytest.MonkeyPatch)
def test_draft_layer_iteration_is_deterministic(monkeypatch: pytest.MonkeyPatch):
"""_draft_attn_layer_names is a set; the attention groups built from it
must not depend on its (process-random) iteration order.
"""
must not depend on its (process-random) iteration order."""
layer_names = {"draft.c.attn", "draft.a.attn", "draft.b.attn"}
expected_order = sorted(layer_names)
+1 -2
View File
@@ -93,8 +93,7 @@ def test_eagle_max_len(
@pytest.mark.parametrize("spec_max_model_len", [80, 150])
def test_mtp_speculative_config_max_model_len(spec_max_model_len: int):
"""Regression test for #41456: max_model_len in speculative config
should be respected for the draft model.
"""
should be respected for the draft model."""
model_config = ModelConfig(
model="XiaomiMiMo/MiMo-7B-Base",
runner="generate",