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
@@ -123,7 +123,7 @@ def test_no_load_chat_template_literallike():
|
||||
)
|
||||
@pytest.mark.parametrize("use_tools", [True, False])
|
||||
def test_resolve_chat_template(sample_json_schema, model, use_tools):
|
||||
"""checks that chat_template is a dict type for HF models."""
|
||||
"""Checks that chat_template is a dict type for HF models."""
|
||||
model_info = HF_EXAMPLE_MODELS.find_hf_info(model)
|
||||
model_info.check_available_online(on_fail="skip")
|
||||
|
||||
@@ -196,7 +196,7 @@ def test_resolve_chat_template(sample_json_schema, model, use_tools):
|
||||
],
|
||||
)
|
||||
def test_resolve_chat_template_kwargs(sample_json_schema, model, expected_kwargs):
|
||||
"""checks that chat_template is a dict type for HF models."""
|
||||
"""Checks that chat_template is a dict type for HF models."""
|
||||
model_info = HF_EXAMPLE_MODELS.find_hf_info(model)
|
||||
model_info.check_available_online(on_fail="skip")
|
||||
|
||||
@@ -308,7 +308,8 @@ def test_resolve_chat_template_kwargs(sample_json_schema, model, expected_kwargs
|
||||
|
||||
def test_resolve_chat_template_resolves_name():
|
||||
"""When chat_template is a name, resolve_chat_template should return
|
||||
the actual Jinja content so that kwargs detection works correctly."""
|
||||
the actual Jinja content so that kwargs detection works correctly.
|
||||
"""
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
jinja_content = "{{ messages }}{% if tools %}{{ tools }}{% endif %}"
|
||||
@@ -330,7 +331,8 @@ def test_resolve_chat_template_resolves_name():
|
||||
|
||||
def test_resolve_chat_template_kwargs_with_template_name():
|
||||
"""Ensures template kwargs are not silently dropped when chat_template
|
||||
was originally a template name that has been resolved to Jinja content."""
|
||||
was originally a template name that has been resolved to Jinja content.
|
||||
"""
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
jinja_content = (
|
||||
@@ -932,7 +934,8 @@ EFFORT_BREAKING_TEMPLATE = (
|
||||
|
||||
class TestApplyChatTemplateEffortTolerant:
|
||||
"""Chat templates that reject unsupported reasoning_effort values should
|
||||
surface a 400-style client error instead of crashing the request."""
|
||||
surface a 400-style client error instead of crashing the request.
|
||||
"""
|
||||
|
||||
@pytest.fixture
|
||||
def model_config(self):
|
||||
|
||||
Reference in New Issue
Block a user