Add pydocstyle to the ruff rules (#52136)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <hej.mellor@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
+8 -4
View File
@@ -403,7 +403,8 @@ def test_mxfp8_linear_emulation_bf16_at_load(
):
"""EmulationMxfp8LinearKernel load-time BF16 dequant (default) and the
``VLLM_MXFP8_EMULATION_DEQUANT_AT_LOAD=0`` per-step fallback must produce the
same result; the dtype-match (BF16/FP16 activations) must also hold."""
same result; the dtype-match (BF16/FP16 activations) must also hold.
"""
from vllm.model_executor.kernels.linear.mxfp8.emulation import (
EmulationMxfp8LinearKernel,
)
@@ -517,7 +518,8 @@ def test_mxfp8_rocm_native_unaligned_k_dequantizes_at_load(shape):
# produced EP garbage).
def _capture_expert_mask(expert_mask, *, global_num_experts):
"""Drive the real ``AiterMxfp8Experts.apply`` mask branch and capture the
``expert_mask`` it forwards to ``rocm_aiter_ops.fused_moe``."""
``expert_mask`` it forwards to ``rocm_aiter_ops.fused_moe``.
"""
from types import SimpleNamespace
from unittest import mock
@@ -568,7 +570,8 @@ def _capture_expert_mask(expert_mask, *, global_num_experts):
@pytest.mark.skipif(not current_platform.is_rocm(), reason="ROCm only")
def test_aiter_mxfp8_apply_forwards_expert_mask_unchanged():
"""AiterMxfp8Experts.apply forwards the precomputed 0/1 mask to aiter as-is
(no re-derivation that would collapse an already-0/1 mask to all-ones)."""
(no re-derivation that would collapse an already-0/1 mask to all-ones).
"""
# 0/1 local-expert mask over global ids + trailing sentinel (rank owns 0..3).
ep_mask = torch.tensor(
[1, 1, 1, 1, 0, 0, 0, 0, 0], dtype=torch.int32, device=DEVICE
@@ -582,7 +585,8 @@ def test_aiter_mxfp8_apply_forwards_expert_mask_unchanged():
def test_routed_experts_expert_map_delegates_to_kernel():
"""RoutedExperts.expert_map returns the 0/1 mask only for kernels that set
``consumes_expert_mask`` (AITER), and the canonical -1 map otherwise -- keyed
on the resolved kernel, not the global aiter switch."""
on the resolved kernel, not the global aiter switch.
"""
from types import SimpleNamespace
from vllm.model_executor.layers.fused_moe.routed_experts import RoutedExperts