[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
@@ -37,8 +37,7 @@ def _transformers_v4_compatibility_import():
|
||||
subset of `ProcessorChatTemplateKwargs` as defined in Transformers v4.
|
||||
In Transformers v5 these were merged into `ProcessorChatTemplateKwargs` and
|
||||
`ChatTemplateLoadKwargs` was removed. For backward compatibility, we add an alias
|
||||
for `ChatTemplateLoadKwargs` if it doesn't exist.
|
||||
"""
|
||||
for `ChatTemplateLoadKwargs` if it doesn't exist."""
|
||||
old_import = getattr(processing_utils, "ChatTemplateLoadKwargs", None)
|
||||
new_import = getattr(processing_utils, "ProcessorChatTemplateKwargs", None)
|
||||
if old_import is None and new_import is not None:
|
||||
@@ -53,8 +52,7 @@ def _transformers_v4_compatibility_init() -> Any:
|
||||
processor instance before calling the original `ProcessorMixin.__init__`.
|
||||
|
||||
This can be removed if `Molmo2ForConditionalGeneration` is upstreamed to
|
||||
Transformers.
|
||||
"""
|
||||
Transformers."""
|
||||
if hasattr(ProcessorMixin.__init__, "_vllm_patched"):
|
||||
return
|
||||
|
||||
@@ -397,8 +395,7 @@ def get_feature_extractor(
|
||||
**kwargs: Any,
|
||||
):
|
||||
"""Load an audio feature extractor for the given model name
|
||||
via HuggingFace.
|
||||
"""
|
||||
via HuggingFace."""
|
||||
try:
|
||||
processor_name = convert_model_repo_to_path(processor_name)
|
||||
feature_extractor = AutoFeatureExtractor.from_pretrained(
|
||||
|
||||
Reference in New Issue
Block a user