[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-05-24 13:44:57 +00:00
commit db79f19270

View file

@ -296,9 +296,7 @@ class TestKeepRecentZero:
_long("assistant", 4000),
_long("user", 4000),
]
out = SlidingWindowCompact(keep_recent = 0).compact(
msgs, budget_tokens = 50
)
out = SlidingWindowCompact(keep_recent = 0).compact(msgs, budget_tokens = 50)
roles = [m["role"] for m in out]
# System + first-user only.
assert roles == ["system", "user"]
@ -349,9 +347,7 @@ class TestAnchoredMultimodalPairCleanup:
_long("assistant", 4000),
_long("user", 4000),
]
out = SlidingWindowCompact(keep_recent = 1).compact(
msgs, budget_tokens = 50
)
out = SlidingWindowCompact(keep_recent = 1).compact(msgs, budget_tokens = 50)
# Anchored multimodal assistant must still be there.
assert any(
m.get("role") == "assistant" and isinstance(m.get("content"), list)