Skip to content

Commit 53ec9d5

Browse files
authored
make format on main branch returns diff on some files (openai#1947)
1 parent cf1b933 commit 53ec9d5

File tree

4 files changed

+20
-22
lines changed

4 files changed

+20
-22
lines changed

src/agents/extensions/models/litellm_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ async def _fetch_response(
269269
)
270270

271271
# Fix for interleaved thinking bug: reorder messages to ensure tool_use comes before tool_result # noqa: E501
272-
if 'anthropic' in self.model.lower() or 'claude' in self.model.lower():
272+
if "anthropic" in self.model.lower() or "claude" in self.model.lower():
273273
converted_messages = self._fix_tool_message_ordering(converted_messages)
274274

275275
if system_instructions:

tests/extensions/memory/test_sqlalchemy_session.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,19 +219,20 @@ async def test_get_items_same_timestamp_consistent_order():
219219
)
220220
)
221221
id_map = {
222-
json.loads(message_json)["id"]: row_id
223-
for row_id, message_json in rows.fetchall()
222+
json.loads(message_json)["id"]: row_id for row_id, message_json in rows.fetchall()
224223
}
225224
shared = datetime(2025, 10, 15, 17, 26, 39, 132483)
226225
older = shared - timedelta(milliseconds=1)
227226
await sess.execute(
228227
update(session._messages)
229-
.where(session._messages.c.id.in_(
230-
[
231-
id_map["rs_same_ts"],
232-
id_map["msg_same_ts"],
233-
]
234-
))
228+
.where(
229+
session._messages.c.id.in_(
230+
[
231+
id_map["rs_same_ts"],
232+
id_map["msg_same_ts"],
233+
]
234+
)
235+
)
235236
.values(created_at=shared)
236237
)
237238
await sess.execute(
@@ -320,9 +321,7 @@ async def test_pop_item_same_timestamp_returns_latest():
320321
async with session._session_factory() as sess:
321322
await sess.execute(
322323
text(
323-
"UPDATE agent_messages "
324-
"SET created_at = :created_at "
325-
"WHERE session_id = :session_id"
324+
"UPDATE agent_messages SET created_at = :created_at WHERE session_id = :session_id"
326325
),
327326
{
328327
"created_at": "2025-10-15 17:26:39.132483",

tests/test_openai_chatcompletions_converter.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,13 @@ def test_extract_all_content_rejects_invalid_input_audio():
303303
"""
304304
input_audio requires both data and format fields to be present.
305305
"""
306-
audio_missing_data = cast(ResponseInputAudioParam, {
307-
"type": "input_audio",
308-
"input_audio": {"format": "wav"},
309-
})
306+
audio_missing_data = cast(
307+
ResponseInputAudioParam,
308+
{
309+
"type": "input_audio",
310+
"input_audio": {"format": "wav"},
311+
},
312+
)
310313
with pytest.raises(UserError):
311314
Converter.extract_all_content([audio_missing_data])
312315

tests/test_strict_schema_oneof.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ def test_oneof_with_refs():
239239
schema = {
240240
"type": "object",
241241
"properties": {
242-
"value": {
243-
"oneOf": [{"$ref": "#/$defs/StringType"}, {"$ref": "#/$defs/IntType"}]
244-
}
242+
"value": {"oneOf": [{"$ref": "#/$defs/StringType"}, {"$ref": "#/$defs/IntType"}]}
245243
},
246244
"$defs": {
247245
"StringType": {"type": "string"},
@@ -254,9 +252,7 @@ def test_oneof_with_refs():
254252
expected = {
255253
"type": "object",
256254
"properties": {
257-
"value": {
258-
"anyOf": [{"$ref": "#/$defs/StringType"}, {"$ref": "#/$defs/IntType"}]
259-
}
255+
"value": {"anyOf": [{"$ref": "#/$defs/StringType"}, {"$ref": "#/$defs/IntType"}]}
260256
},
261257
"$defs": {
262258
"StringType": {"type": "string"},

0 commit comments

Comments
 (0)