[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
+10 -20
View File
@@ -441,8 +441,7 @@ def test_no_hisparse_connector_keeps_attention_config_unset(monkeypatch):
def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch):
"""ROCm keeps the DSA models (DeepSeek V3.2/V4, GLM-5.2) on their compiled
MRV1 paths and off breakable cudagraphs by default.
"""
MRV1 paths and off breakable cudagraphs by default."""
from vllm.config.vllm import (
ROCM_DEFAULT_MRV1_ARCHITECTURES,
default_breakable_cudagraph_architectures,
@@ -657,8 +656,7 @@ def test_v2_model_runner_supports_extract_hidden_states():
def test_dflash2_draft_forces_v2_model_runner():
"""A DFlash2 draft must reach the V2 speculator, the only one that runs its
candidate selector; on V1 it would draft as DFlash1 without raising.
"""
candidate selector; on V1 it would draft as DFlash1 without raising."""
def config(method, architectures):
return SimpleNamespace(
@@ -771,8 +769,7 @@ def test_late_piecewise_restrictions_without_compilation(monkeypatch, engine_kwa
def test_resolve_cudagraph_mode_skips_mamba_block_check_while_profiling():
"""Cudagraph memory profiling uses a minimal KV cache, so the Mamba
block-count guard must only fire for the real cache sizing.
"""
block-count guard must only fire for the real cache sizing."""
kv_cache_config = SimpleNamespace(has_mamba_layers=True, num_blocks=4)
compilation_config = CompilationConfig(
@@ -1097,8 +1094,7 @@ def test_v1_model_runner_rejects_v2_only_features():
def test_batch_sharded_sampling_rejects_return_sampling_mask():
"""The batch-sharded gather drops sampling masks, so the combination must
fail loudly instead of returning ``sampling_mask=None``.
"""
fail loudly instead of returning ``sampling_mask=None``."""
config = SimpleNamespace(
parallel_config=SimpleNamespace(
enable_batch_sharded_sampling=True, tensor_parallel_size=2
@@ -2195,8 +2191,7 @@ class MockConfig:
@patch("vllm.transformers_utils.runai_utils.ObjectStorageModel.pull_files")
def test_s3_url_model_tokenizer_paths(mock_pull_files, s3_url):
"""Test that S3 URLs create deterministic local directories for model and
tokenizer.
"""
tokenizer."""
# Mock pull_files to avoid actually downloading files during tests
mock_pull_files.return_value = None
@@ -2294,8 +2289,7 @@ def test_s3_url_different_models_create_different_directories(mock_pull_files):
@patch("vllm.transformers_utils.runai_utils.ObjectStorageModel.pull_files")
def test_s3_url_different_model_and_tokenizer(mock_pull_files):
"""Test that when model and tokenizer are different cloud URIs,
pull_files receives the correct URI for each.
"""
pull_files receives the correct URI for each."""
mock_pull_files.return_value = None
model_url = "s3://bucket/model/"
@@ -2840,8 +2834,7 @@ def test_vllm_config_explicit_overrides():
def test_fusion_pass_op_priority():
"""This test checks that custom op enablement & IR op priority
correctly control default fusions
"""
correctly control default fusions"""
# Default config, O2, rms_norm+quant fusion disabled
cfg1 = VllmConfig()
assert not cfg1.compilation_config.pass_config.fuse_norm_quant
@@ -2925,8 +2918,7 @@ def test_needs_dp_coordination(
def test_fault_tolerance_requires_single_api_server():
"""Fault tolerance assumes one AsyncMPClient manages all engines, so it
is incompatible with API server scale-out (_api_process_count > 1).
"""
is incompatible with API server scale-out (_api_process_count > 1)."""
with pytest.raises(ValueError, match="single API server"):
ParallelConfig(enable_fault_tolerance=True, _api_process_count=2)
@@ -2936,8 +2928,7 @@ def test_fault_tolerance_requires_single_api_server():
def test_renderer_num_workers_with_mm_cache():
"""Disallow renderer_num_workers > 1 with the mm processor cache only for
pooling models, whose preprocessing runs on the renderer workers.
"""
pooling models, whose preprocessing runs on the renderer workers."""
mm_model = "Qwen/Qwen2-VL-2B-Instruct"
# Should raise: pooling + multi-worker + cache enabled (default cache_gb=4)
@@ -3263,8 +3254,7 @@ def test_watermarking_forces_model_runner_v2(monkeypatch):
def test_mtp_draft_uses_model_weights_not_local_cache(mock_model_config_cls):
"""Regression test: MTP + runai_streamer should use model_weights (original
S3 URL) for the draft model, not model (local cache dir set by
pull_runai_model_from_obj_storage).
"""
pull_runai_model_from_obj_storage)."""
from unittest.mock import MagicMock
s3_url = "s3://my-bucket/Qwen3-35B-A3B-FP8"