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
+5 -8
View File
@@ -127,9 +127,7 @@ class StructuredOutputsParams:
)
def all_constraints_none(self) -> bool:
"""
Returns True if all structured-output constraint fields are None.
"""
"""Returns True if all structured-output constraint fields are None."""
return all(
getattr(self, field) is None
for field in (
@@ -143,9 +141,7 @@ class StructuredOutputsParams:
)
def all_non_structural_tag_constraints_none(self) -> bool:
"""
Returns True if all structured-output constraint fields are None.
"""
"""Returns True if all structured-output constraint fields are None."""
return all(
getattr(self, field) is None
for field in (
@@ -692,7 +688,7 @@ class SamplingParams(
generation_config: dict[str, Any],
eos_token_id: int | None = None,
) -> None:
"""Update if there are non-default values from generation_config"""
"""Update if there are non-default values from generation_config."""
if not self.ignore_eos:
self._eos_token_id = eos_token_id
@@ -804,7 +800,8 @@ class SamplingParams(
"""Number of sample logprobs to return per output token, or `None` if
no sample logprobs were requested. Takes `logprob_token_ids` into
account: when `logprobs` is unset but `logprob_token_ids` is set,
returns `len(logprob_token_ids)`."""
returns `len(logprob_token_ids)`.
"""
if self.logprobs is not None:
return self.logprobs
return len(self.logprob_token_ids) if self.logprob_token_ids else None