Skip to content

Commit e7a812f

Browse files
authored
chore: Fixup main pre commit (#3204)
1 parent 8cc4925 commit e7a812f

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ repos:
148148
files: ^.github/workflows/.*$
149149
- id: ui-prettier
150150
name: Format UI code with Prettier
151-
entry: bash -c 'cd llama_stack/ui && npm run format'
151+
entry: bash -c 'cd llama_stack/ui && npm ci && npm run format'
152152
language: system
153153
files: ^llama_stack/ui/.*\.(ts|tsx)$
154154
pass_filenames: false
155155
require_serial: true
156156
- id: ui-eslint
157157
name: Lint UI code with ESLint
158-
entry: bash -c 'cd llama_stack/ui && npm run lint -- --fix --quiet'
158+
entry: bash -c 'cd llama_stack/ui && npm ci && npm run lint -- --fix --quiet'
159159
language: system
160160
files: ^llama_stack/ui/.*\.(ts|tsx)$
161161
pass_filenames: false

docs/source/distributions/k8s-benchmark/benchmark.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
# Copyright (c) Meta Platforms, Inc. and affiliates.
32
# All rights reserved.
43
#

tests/unit/providers/agents/meta_reference/test_response_conversion_utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545

4646

4747
class TestConvertChatChoiceToResponseMessage:
48-
@pytest.mark.asyncio
4948
async def test_convert_string_content(self):
5049
choice = OpenAIChoice(
5150
message=OpenAIAssistantMessageParam(content="Test message"),
@@ -61,7 +60,6 @@ async def test_convert_string_content(self):
6160
assert isinstance(result.content[0], OpenAIResponseOutputMessageContentOutputText)
6261
assert result.content[0].text == "Test message"
6362

64-
@pytest.mark.asyncio
6563
async def test_convert_text_param_content(self):
6664
choice = OpenAIChoice(
6765
message=OpenAIAssistantMessageParam(
@@ -78,12 +76,10 @@ async def test_convert_text_param_content(self):
7876

7977

8078
class TestConvertResponseContentToChatContent:
81-
@pytest.mark.asyncio
8279
async def test_convert_string_content(self):
8380
result = await convert_response_content_to_chat_content("Simple string")
8481
assert result == "Simple string"
8582

86-
@pytest.mark.asyncio
8783
async def test_convert_text_content_parts(self):
8884
content = [
8985
OpenAIResponseInputMessageContentText(text="First part"),
@@ -98,7 +94,6 @@ async def test_convert_text_content_parts(self):
9894
assert isinstance(result[1], OpenAIChatCompletionContentPartTextParam)
9995
assert result[1].text == "Second part"
10096

101-
@pytest.mark.asyncio
10297
async def test_convert_image_content(self):
10398
content = [OpenAIResponseInputMessageContentImage(image_url="https://example.com/image.jpg", detail="high")]
10499

@@ -111,15 +106,13 @@ async def test_convert_image_content(self):
111106

112107

113108
class TestConvertResponseInputToChatMessages:
114-
@pytest.mark.asyncio
115109
async def test_convert_string_input(self):
116110
result = await convert_response_input_to_chat_messages("User message")
117111

118112
assert len(result) == 1
119113
assert isinstance(result[0], OpenAIUserMessageParam)
120114
assert result[0].content == "User message"
121115

122-
@pytest.mark.asyncio
123116
async def test_convert_function_tool_call_output(self):
124117
input_items = [
125118
OpenAIResponseInputFunctionToolCallOutput(
@@ -135,7 +128,6 @@ async def test_convert_function_tool_call_output(self):
135128
assert result[0].content == "Tool output"
136129
assert result[0].tool_call_id == "call_123"
137130

138-
@pytest.mark.asyncio
139131
async def test_convert_function_tool_call(self):
140132
input_items = [
141133
OpenAIResponseOutputMessageFunctionToolCall(
@@ -154,7 +146,6 @@ async def test_convert_function_tool_call(self):
154146
assert result[0].tool_calls[0].function.name == "test_function"
155147
assert result[0].tool_calls[0].function.arguments == '{"param": "value"}'
156148

157-
@pytest.mark.asyncio
158149
async def test_convert_response_message(self):
159150
input_items = [
160151
OpenAIResponseMessage(
@@ -173,22 +164,19 @@ async def test_convert_response_message(self):
173164

174165

175166
class TestConvertResponseTextToChatResponseFormat:
176-
@pytest.mark.asyncio
177167
async def test_convert_text_format(self):
178168
text = OpenAIResponseText(format=OpenAIResponseTextFormat(type="text"))
179169
result = await convert_response_text_to_chat_response_format(text)
180170

181171
assert isinstance(result, OpenAIResponseFormatText)
182172
assert result.type == "text"
183173

184-
@pytest.mark.asyncio
185174
async def test_convert_json_object_format(self):
186175
text = OpenAIResponseText(format={"type": "json_object"})
187176
result = await convert_response_text_to_chat_response_format(text)
188177

189178
assert isinstance(result, OpenAIResponseFormatJSONObject)
190179

191-
@pytest.mark.asyncio
192180
async def test_convert_json_schema_format(self):
193181
schema_def = {"type": "object", "properties": {"test": {"type": "string"}}}
194182
text = OpenAIResponseText(
@@ -204,7 +192,6 @@ async def test_convert_json_schema_format(self):
204192
assert result.json_schema["name"] == "test_schema"
205193
assert result.json_schema["schema"] == schema_def
206194

207-
@pytest.mark.asyncio
208195
async def test_default_text_format(self):
209196
text = OpenAIResponseText()
210197
result = await convert_response_text_to_chat_response_format(text)
@@ -214,27 +201,22 @@ async def test_default_text_format(self):
214201

215202

216203
class TestGetMessageTypeByRole:
217-
@pytest.mark.asyncio
218204
async def test_user_role(self):
219205
result = await get_message_type_by_role("user")
220206
assert result == OpenAIUserMessageParam
221207

222-
@pytest.mark.asyncio
223208
async def test_system_role(self):
224209
result = await get_message_type_by_role("system")
225210
assert result == OpenAISystemMessageParam
226211

227-
@pytest.mark.asyncio
228212
async def test_assistant_role(self):
229213
result = await get_message_type_by_role("assistant")
230214
assert result == OpenAIAssistantMessageParam
231215

232-
@pytest.mark.asyncio
233216
async def test_developer_role(self):
234217
result = await get_message_type_by_role("developer")
235218
assert result == OpenAIDeveloperMessageParam
236219

237-
@pytest.mark.asyncio
238220
async def test_unknown_role(self):
239221
result = await get_message_type_by_role("unknown")
240222
assert result is None

0 commit comments

Comments
 (0)