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:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -1,6 +1,4 @@
|
||||
"""
|
||||
Schemas and utilities for preprocessing inputs.
|
||||
"""
|
||||
"""Schemas and utilities for preprocessing inputs."""
|
||||
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
@@ -90,8 +88,7 @@ that has been standardized into a dictionary.
|
||||
|
||||
|
||||
class EncoderDecoderDictPrompt(TypedDict):
|
||||
"""
|
||||
A [`EncoderDecoderPrompt`][vllm.inputs.llm.EncoderDecoderPrompt]
|
||||
"""A [`EncoderDecoderPrompt`][vllm.inputs.llm.EncoderDecoderPrompt]
|
||||
that has been standardized into a dictionary.
|
||||
"""
|
||||
|
||||
@@ -130,9 +127,7 @@ def _validate_prompt_dict(prompt: Mapping[str, object]) -> None:
|
||||
|
||||
|
||||
def parse_dec_only_prompt(prompt: PromptType | object) -> DecoderOnlyDictPrompt:
|
||||
"""
|
||||
Parse a prompt for a decoder-only model and normalize it to a dictionary.
|
||||
"""
|
||||
"""Parse a prompt for a decoder-only model and normalize it to a dictionary."""
|
||||
if isinstance(prompt, str):
|
||||
return TextPrompt(prompt=prompt)
|
||||
|
||||
@@ -216,9 +211,7 @@ def _parse_dec_prompt(prompt: PromptType | object) -> DecoderDictPrompt:
|
||||
|
||||
|
||||
def parse_enc_dec_prompt(prompt: PromptType | object) -> EncoderDecoderDictPrompt:
|
||||
"""
|
||||
Parse a prompt for an encoder-decoder model and normalize it to a dictionary.
|
||||
"""
|
||||
"""Parse a prompt for an encoder-decoder model and normalize it to a dictionary."""
|
||||
if isinstance(prompt, dict) and "encoder_prompt" in prompt:
|
||||
enc_prompt = prompt["encoder_prompt"] # type: ignore[typeddict-item]
|
||||
dec_prompt = prompt["decoder_prompt"] # type: ignore[typeddict-item]
|
||||
|
||||
Reference in New Issue
Block a user