From 093f4656200b690044234167c0e096dd9dfb81a2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 15:48:13 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/tests/test_sampling_params_routing.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/studio/backend/tests/test_sampling_params_routing.py b/studio/backend/tests/test_sampling_params_routing.py index e5a16e03ad..e7da1684cd 100644 --- a/studio/backend/tests/test_sampling_params_routing.py +++ b/studio/backend/tests/test_sampling_params_routing.py @@ -109,18 +109,14 @@ def test_anthropic_stop_sequences_dedup_and_drop_empties(monkeypatch): """Whitespace-only / duplicate chips shouldn't reach the wire and waste budget against Anthropic's 16-entry cap.""" captured = _install_mock(monkeypatch) - body = _drive_anthropic( - captured, stop = ["END", "", "END", "DONE", " ", "END"] - ) + body = _drive_anthropic(captured, stop = ["END", "", "END", "DONE", " ", "END"]) # Order preserved on first sight, duplicates and empties dropped. assert body.get("stop_sequences") == ["END", "DONE", " "], body def test_anthropic_stop_sequences_truncated_to_16(monkeypatch): captured = _install_mock(monkeypatch) - body = _drive_anthropic( - captured, stop = [f"S{i}" for i in range(20)] - ) + body = _drive_anthropic(captured, stop = [f"S{i}" for i in range(20)]) assert len(body.get("stop_sequences", [])) == 16, body assert body["stop_sequences"][0] == "S0" assert body["stop_sequences"][-1] == "S15" @@ -242,9 +238,7 @@ def test_openai_compat_truncates_stop_to_four(monkeypatch): def test_openai_compat_stop_dedup_and_drop_empties(monkeypatch): """Duplicates and empties shouldn't eat into the 4-entry cap.""" captured = _install_mock(monkeypatch, sse_payload = _oai_done_payload()) - body = _drive_openai_compat( - captured, stop = ["END", "", "END", "DONE", "FIN", "END"] - ) + body = _drive_openai_compat(captured, stop = ["END", "", "END", "DONE", "FIN", "END"]) assert body.get("stop") == ["END", "DONE", "FIN"], body