[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:
co-authored by
Claude Opus 5
parent
1085b64425
commit
651a88c09a
@@ -330,8 +330,7 @@ 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
|
||||
@@ -365,8 +364,7 @@ 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,
|
||||
|
||||
@@ -188,8 +188,7 @@ 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,8 +227,7 @@ 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,7 @@ 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user