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
@@ -330,7 +330,8 @@ def test_sample_frames_fps_interval(video_processor):
def test_defaults_mirror_checkpoint_config():
"""Bare instantiation matches the checkpoint's ``processor_config.json``
token-budget style defaults; ``size`` carries no budget."""
token-budget style defaults; ``size`` carries no budget.
"""
image_processor = Glm5NextImageProcessor()
assert image_processor.patch_expand_factor == 1
assert image_processor.min_image_tokens == 16
@@ -364,7 +365,8 @@ def test_missing_token_budgets_rejected():
def test_video_config_fields_land():
"""fps_interval / max_frame_count_dynamic from the dedicated config
shape sampling without any request overrides."""
shape sampling without any request overrides.
"""
proc = Glm5NextVideoProcessor(
fps_interval=4,
max_frame_count_dynamic=32,
+5 -4
View File
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
This test file includes some cases where it is inappropriate to
"""This test file includes some cases where it is inappropriate to
only get the `eos_token_id` from the tokenizer as defined by
`BaseRenderer.get_eos_token_id`.
"""
@@ -189,7 +188,8 @@ def test_model_config_generation_fallback_forwards_code_revision():
def test_safetensors_metadata_of_repo_without_safetensors():
"""A repo storing its weights in another format is an answer, not a failure,
so it must not be retried."""
so it must not be retried.
"""
from huggingface_hub.errors import LocalEntryNotFoundError, NotASafetensorsRepoError
get_safetensors_metadata = MagicMock(
@@ -228,7 +228,8 @@ def test_mrope_num_dims(section_key, mrope_section, expected_num_dims):
@pytest.mark.parametrize("section_name", ["mrope_section", "xdrope_section"])
def test_mrope_num_dims_from_config_attribute(section_name):
"""Some configs expose the section as an attribute rather than under
`rope_parameters`."""
`rope_parameters`.
"""
config = PretrainedConfig()
setattr(config, section_name, [16, 16, 16, 16])
@@ -22,8 +22,8 @@ def test_hf_overrides_model_type_returns_correct_config_class():
"""When hf_overrides sets model_type to a registered custom type whose
checkpoint has a *different* model_type on disk, get_config() must return
an instance of the registered config class — not the class that matches
the on-disk model_type."""
the on-disk model_type.
"""
# Register the custom config
_CONFIG_REGISTRY["test_custom_model"] = _TestCustomConfig