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
@@ -36,11 +36,13 @@ def test_should_include_usage_force_enables_continuous_usage(stream_options, exp
class TestGetMaxTokens:
"""Tests for get_max_tokens() to ensure generation_config's max_tokens
acts as a default when from model author, and as a ceiling when
explicitly set by the user."""
explicitly set by the user.
"""
def test_default_sampling_params_used_when_no_request_max_tokens(self):
"""When user doesn't specify max_tokens, generation_config default
should apply."""
should apply.
"""
result = get_max_tokens(
max_model_len=24000,
max_tokens=None,
@@ -51,7 +53,8 @@ class TestGetMaxTokens:
def test_request_max_tokens_not_capped_by_default_sampling_params(self):
"""When user specifies max_tokens in request, model author's
generation_config max_tokens must NOT cap it (fixes #34005)."""
generation_config max_tokens must NOT cap it (fixes #34005).
"""
result = get_max_tokens(
max_model_len=24000,
max_tokens=5000,
@@ -94,7 +97,8 @@ class TestGetMaxTokens:
def test_request_max_tokens_smaller_than_default(self):
"""When user explicitly requests fewer tokens than gen_config default,
that should be respected."""
that should be respected.
"""
result = get_max_tokens(
max_model_len=24000,
max_tokens=512,