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
+7 -6
View File
@@ -114,7 +114,8 @@ logger = init_logger(__name__)
def _text_config(config):
"""MuseGlimmer checkpoints may nest the text config under ``text_config``
(multimodal ``MuseGlimmerConfig``) or expose it directly
(``MuseGlimmerTextConfig``)."""
(``MuseGlimmerTextConfig``).
"""
return getattr(config, "text_config", config)
@@ -485,7 +486,8 @@ class MuseGlimmerMultiModalProcessor(
def _muse_glimmer_use_qk_norm(config) -> bool:
"""Whether QK-norm is applied. MuseGlimmer ALWAYS applies QK-norm; the modular HF
``text_config`` schema simply omits ``use_qk_norm`` (reads as ``None``).
Treat a missing/None flag as True — only an explicit ``False`` disables it."""
Treat a missing/None flag as True — only an explicit ``False`` disables it.
"""
val = getattr(config, "use_qk_norm", None)
return True if val is None else bool(val)
@@ -493,7 +495,8 @@ def _muse_glimmer_use_qk_norm(config) -> bool:
def _muse_glimmer_use_attn_output_gate(config) -> bool:
"""Whether the per-head sigmoid attention output gate is applied. MuseGlimmer ALWAYS
applies it; the modular HF ``text_config`` omits ``use_attn_output_gate``
(reads as ``None``). Missing/None -> True; only explicit ``False`` disables."""
(reads as ``None``). Missing/None -> True; only explicit ``False`` disables.
"""
val = getattr(config, "use_attn_output_gate", None)
return True if val is None else bool(val)
@@ -1663,9 +1666,7 @@ class MuseGlimmerForCausalLM(
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
def get_mm_mapping(self) -> MultiModelKeys:
"""
Get the module prefix in multimodal models
"""
"""Get the module prefix in multimodal models"""
return MultiModelKeys.from_string_field(
language_model="model",
connector=["vision_adapter.", "vision_projection."],