Skip to content

Commit 140b523

Browse files
committed
linting
1 parent 4bca0ef commit 140b523

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

tests/models/test_bedrock.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,18 +1378,14 @@ async def test_bedrock_model_stream_empty_text_delta(allow_model_requests: None,
13781378
)
13791379

13801380

1381-
13821381
async def test_cache_point_filtering():
13831382
"""Test that CachePoint is filtered out in Bedrock message mapping."""
13841383
from itertools import count
13851384
from pydantic_ai import CachePoint, UserPromptPart
13861385
from pydantic_ai.models.bedrock import BedrockConverseModel
1387-
1388-
# Test the static method directly
1389-
messages = await BedrockConverseModel._map_user_prompt(
1390-
UserPromptPart(content=['text', CachePoint()]),
1391-
count()
1392-
)
1386+
1387+
# Test the static method directly
1388+
messages = await BedrockConverseModel._map_user_prompt(UserPromptPart(content=['text', CachePoint()]), count())
13931389
# CachePoint should be filtered out, message should still be valid
13941390
assert len(messages) == 1
13951391
assert messages[0]['role'] == 'user'

tests/models/test_google.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,11 +3065,10 @@ async def test_google_httpx_client_is_not_closed(allow_model_requests: None, gem
30653065
assert result.output == snapshot('The capital of Mexico is **Mexico City**.')
30663066

30673067

3068-
30693068
def test_cache_point_filtering():
30703069
"""Test that CachePoint is filtered out in Google internal method."""
30713070
from pydantic_ai import CachePoint
3072-
3071+
30733072
# Test that CachePoint in a list is handled (triggers line 606)
30743073
# We can't easily call _map_user_content without a full model setup,
30753074
# but we can verify the isinstance check with a simple lambda

tests/models/test_huggingface.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,15 +992,14 @@ async def test_hf_model_thinking_part_iter(allow_model_requests: None, huggingfa
992992
)
993993

994994

995-
996995
async def test_cache_point_filtering():
997996
"""Test that CachePoint is filtered out in HuggingFace message mapping."""
998997
from pydantic_ai import CachePoint, UserPromptPart
999998
from pydantic_ai.models.huggingface import HuggingFaceModel
1000-
999+
10011000
# Test the static method directly
10021001
msg = await HuggingFaceModel._map_user_prompt(UserPromptPart(content=['text', CachePoint()]))
1003-
1002+
10041003
# CachePoint should be filtered out
10051004
assert msg['role'] == 'user'
10061005
assert len(msg['content']) == 1

0 commit comments

Comments
 (0)