Skip to content

Commit aa11f5d

Browse files
committed
format
1 parent 47a3db3 commit aa11f5d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pydantic_ai_slim/pydantic_ai/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ def from_path(cls, path: PathLike[str]) -> Self:
10931093

10941094
binary_content = BinaryContent(data=path.read_bytes(), media_type=media_type)
10951095
return cls(content=binary_content)
1096-
1096+
10971097
__repr__ = _utils.dataclasses_no_defaults_repr
10981098

10991099

tests/test_messages.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,7 @@ def test_file_part_from_path(tmp_path: Path):
621621
test_xml_file.write_text('<think>about trains</think>', encoding='utf-8')
622622
file_part = FilePart.from_path(test_xml_file)
623623
assert file_part == snapshot(
624-
FilePart(
625-
content=BinaryContent(data=b'<think>about trains</think>', media_type='application/xml')
626-
)
624+
FilePart(content=BinaryContent(data=b'<think>about trains</think>', media_type='application/xml'))
627625
)
628626

629627
# test non-existent file
@@ -636,7 +634,5 @@ def test_file_part_from_path(tmp_path: Path):
636634
test_unknown_file.write_text('some content', encoding='utf-8')
637635
file_part = FilePart.from_path(test_unknown_file)
638636
assert file_part == snapshot(
639-
FilePart(
640-
content=BinaryContent(data=b'some content', media_type='application/octet-stream')
641-
)
642-
)
637+
FilePart(content=BinaryContent(data=b'some content', media_type='application/octet-stream'))
638+
)

0 commit comments

Comments
 (0)