[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
@@ -15,8 +15,7 @@ from vllm.v1.kv_offload.cpu.policies.lru import LRUCachePolicy
class _DummyCachePolicy(CachePolicy):
"""Minimal CachePolicy for CachePolicyFactory registration tests. Loaded
by module path, so it must be importable at module scope (mirrors
tests/v1/kv_offload/test_factory.py's SingleArgExternalOffloadingSpec).
"""
tests/v1/kv_offload/test_factory.py's SingleArgExternalOffloadingSpec)."""
def __init__(self, cache_capacity: int) -> None:
self.cache_capacity = cache_capacity
@@ -55,8 +54,7 @@ class TestCachePolicyFactory:
def test_pre_registered_policies_can_be_imported(self):
"""If someone moves a policy module but forgets to update
factory.py, CI fails.
"""
factory.py, CI fails."""
for name in CachePolicyFactory._registry:
cls = CachePolicyFactory._registry[name]()
assert issubclass(cls, CachePolicy)
@@ -90,8 +88,7 @@ class TestCachePolicyFactory:
register_cache_policy() call -- this is how external projects
integrate a custom CachePolicy without forking/patching vLLM.
Mirrors tests/v1/kv_offload/test_factory.py's
test_dynamic_load_via_spec_module_path.
"""
test_dynamic_load_via_spec_module_path."""
policy_cls = CachePolicyFactory.get_cache_policy_cls(
"_DummyCachePolicy", "tests.v1.kv_offload.cpu.policies.test_factory"
)
@@ -99,8 +96,7 @@ class TestCachePolicyFactory:
def test_manager_resolves_policy_via_module_path(self):
"""End-to-end: CPUOffloadingManager resolves an unregistered policy
purely from cache_policy_module_path.
"""
purely from cache_policy_module_path."""
manager = CPUOffloadingManager(
num_chunks=4,
cache_policy="_DummyCachePolicy",
@@ -110,7 +106,6 @@ class TestCachePolicyFactory:
def test_unregistered_policy_without_module_path_raises(self):
"""eviction_policy not in registry + no cache_policy_module_path ->
ValueError, same shape as the OffloadingSpecFactory error path.
"""
ValueError, same shape as the OffloadingSpecFactory error path."""
with pytest.raises(ValueError, match="Unknown cache policy"):
CachePolicyFactory.get_cache_policy_cls("nonexistent", None)