Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
exclude: (queryscript/tests/.*\.(expected|test)|.*cassette.*\.ya?ml)$
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.7
rev: v0.15.21
hooks:
- id: ruff-format
- id: ruff-check
Expand Down
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
python 3.14.3
pre-commit 4.2.0
uv 0.11.6
python 3.14.6
pre-commit 4.6.0
uv 0.11.28
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _.python.venv = { path = "py/.venv", create = true, uv_create_args = ['--seed']}
_.file = ".env"

[tools]
ruff = "0.12.7"
ruff = "0.15.21"

[hooks]
postinstall = "make install-deps"
2 changes: 1 addition & 1 deletion py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ dev = [
{include-group = "test"},
{include-group = "build"},
"nox==2026.2.9",
"pre-commit==4.5.1",
"pre-commit==4.6.0",
"pylint==4.0.5",
"pyperf==2.10.0",
]
Expand Down
6 changes: 4 additions & 2 deletions py/src/braintrust/integrations/litellm/test_litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ def test_litellm_tool_calls(memory_logger):
"metadata": {
"model": TEST_MODEL,
"provider": "litellm",
"tools": lambda tools_list: len(tools_list) == 1
and any(tool.get("function", {}).get("name") == "get_weather" for tool in tools_list),
"tools": lambda tools_list: (
len(tools_list) == 1
and any(tool.get("function", {}).get("name") == "get_weather" for tool in tools_list)
),
},
"input": lambda inp: "What's the weather in New York?" in str(inp),
"metrics": lambda m: assert_metrics_are_valid(m, start, end) is None,
Expand Down
8 changes: 5 additions & 3 deletions py/src/braintrust/integrations/openai/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,9 +2100,11 @@ def test_openai_parallel_tool_calls(memory_logger):
"model": TEST_MODEL,
"provider": "openai",
"stream": stream,
"tools": lambda tools_list: len(tools_list) == 2
and any(tool.get("function", {}).get("name") == "get_weather" for tool in tools_list)
and any(tool.get("function", {}).get("name") == "get_time" for tool in tools_list),
"tools": lambda tools_list: (
len(tools_list) == 2
and any(tool.get("function", {}).get("name") == "get_weather" for tool in tools_list)
and any(tool.get("function", {}).get("name") == "get_time" for tool in tools_list)
),
},
"input": lambda inp: "What's the weather in New York and the time in Tokyo?" in str(inp),
"metrics": lambda m: assert_metrics_are_valid(m, start, end) is None,
Expand Down
12 changes: 7 additions & 5 deletions py/src/braintrust/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,11 +933,13 @@ def test_render_message_with_file_content_parts(self):
)

rendered = render_message(
lambda template: template.replace("{{item}}", "document")
.replace("{{image_url}}", "https://example.com/image.png")
.replace("{{file_data}}", "base64data")
.replace("{{file_id}}", "file-456")
.replace("{{filename}}", "report.pdf"),
lambda template: (
template.replace("{{item}}", "document")
.replace("{{image_url}}", "https://example.com/image.png")
.replace("{{file_data}}", "base64data")
.replace("{{file_id}}", "file-456")
.replace("{{filename}}", "report.pdf")
),
message,
)

Expand Down
8 changes: 4 additions & 4 deletions py/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.