Skip to content

Commit bcfc363

Browse files
Fix Python lint errors (line too long)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cbb5e33 commit bcfc363

File tree

48 files changed

+1230
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1230
-341
lines changed

python/e2e/test_mcp_and_agents.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ async def test_should_pass_literal_env_values_to_mcp_server_subprocess(
9393

9494
message = await session.send_and_wait(
9595
{
96-
"prompt": "Use the env-echo/get_env tool to read the TEST_SECRET environment variable. Reply with just the value, nothing else."
96+
"prompt": "Use the env-echo/get_env tool to read the TEST_SECRET "
97+
"environment variable. Reply with just the value, nothing else."
9798
}
9899
)
99100
assert message is not None

python/e2e/testharness/context.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818

1919
def get_cli_path_for_tests() -> str:
20-
"""Get CLI path for E2E tests. Uses COPILOT_CLI_PATH env var if set, otherwise node_modules CLI."""
20+
"""Get CLI path for E2E tests.
21+
22+
Uses COPILOT_CLI_PATH env var if set, otherwise node_modules CLI.
23+
"""
2124
env_path = os.environ.get("COPILOT_CLI_PATH")
2225
if env_path and Path(env_path).exists():
2326
return str(Path(env_path).resolve())

test/snapshots/ask_user/should_handle_freeform_user_input_response.yaml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,52 @@ conversations:
55
- role: system
66
content: ${system}
77
- role: user
8-
content: Ask me a question using ask_user and then include my answer in your response. The question should be 'What is
8+
content: >-
9+
Ask me a question using ask_user and then include my answer in your response. The question should be 'What is
910
your favorite color?'
11+
12+
13+
<reminder>
14+
15+
<sql_tables>No tables currently exist. Default tables (todos, todo_deps) will be created automatically when
16+
you first use the SQL tool.</sql_tables>
17+
18+
</reminder>
1019
- role: assistant
20+
content: I'll ask you that question now.
21+
- role: assistant
22+
tool_calls:
23+
- id: toolcall_0
24+
type: function
25+
function:
26+
name: ask_user
27+
arguments: '{"allow_freeform":true,"question":"What is your favorite color?"}'
28+
- messages:
29+
- role: system
30+
content: ${system}
31+
- role: user
32+
content: >-
33+
Ask me a question using ask_user and then include my answer in your response. The question should be 'What is
34+
your favorite color?'
35+
36+
37+
<reminder>
38+
39+
<sql_tables>No tables currently exist. Default tables (todos, todo_deps) will be created automatically when
40+
you first use the SQL tool.</sql_tables>
41+
42+
</reminder>
43+
- role: assistant
44+
content: I'll ask you that question now.
1145
tool_calls:
1246
- id: toolcall_0
1347
type: function
1448
function:
1549
name: ask_user
16-
arguments: '{"question":"What is your favorite color?"}'
50+
arguments: '{"allow_freeform":true,"question":"What is your favorite color?"}'
1751
- role: tool
1852
tool_call_id: toolcall_0
1953
content: "User responded: This is my custom freeform answer that was not in the choices"
2054
- role: assistant
21-
content: 'You answered: "This is my custom freeform answer that was not in the choices"'
55+
content: 'Your answer to "What is your favorite color?" was: **This is my custom freeform answer that was not in the
56+
choices**'

test/snapshots/ask_user/should_invoke_user_input_handler_when_model_uses_ask_user_tool.yaml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,51 @@ conversations:
55
- role: system
66
content: ${system}
77
- role: user
8-
content: Ask me to choose between 'Option A' and 'Option B' using the ask_user tool. Wait for my response before
8+
content: >-
9+
Ask me to choose between 'Option A' and 'Option B' using the ask_user tool. Wait for my response before
910
continuing.
11+
12+
13+
<reminder>
14+
15+
<sql_tables>No tables currently exist. Default tables (todos, todo_deps) will be created automatically when
16+
you first use the SQL tool.</sql_tables>
17+
18+
</reminder>
1019
- role: assistant
20+
content: I'll ask you to choose between the two options.
21+
- role: assistant
22+
tool_calls:
23+
- id: toolcall_0
24+
type: function
25+
function:
26+
name: ask_user
27+
arguments: '{"choices":["Option A","Option B"],"question":"Please choose between Option A and Option B."}'
28+
- messages:
29+
- role: system
30+
content: ${system}
31+
- role: user
32+
content: >-
33+
Ask me to choose between 'Option A' and 'Option B' using the ask_user tool. Wait for my response before
34+
continuing.
35+
36+
37+
<reminder>
38+
39+
<sql_tables>No tables currently exist. Default tables (todos, todo_deps) will be created automatically when
40+
you first use the SQL tool.</sql_tables>
41+
42+
</reminder>
43+
- role: assistant
44+
content: I'll ask you to choose between the two options.
1145
tool_calls:
1246
- id: toolcall_0
1347
type: function
1448
function:
1549
name: ask_user
16-
arguments: '{"question":"Please choose between the following options:","choices":["Option A","Option B"]}'
50+
arguments: '{"choices":["Option A","Option B"],"question":"Please choose between Option A and Option B."}'
1751
- role: tool
1852
tool_call_id: toolcall_0
1953
content: "User selected: Option A"
2054
- role: assistant
21-
content: You selected **Option A**. How would you like to proceed?
55+
content: You selected Option A. How would you like me to proceed?

test/snapshots/ask_user/should_receive_choices_in_user_input_request.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@ conversations:
55
- role: system
66
content: ${system}
77
- role: user
8-
content: "Use the ask_user tool to ask me to pick between exactly two options: 'Red' and 'Blue'. These should be
9-
provided as choices. Wait for my answer."
8+
content: >-
9+
Use the ask_user tool to ask me to pick between exactly two options: 'Red' and 'Blue'. These should be
10+
provided as choices. Wait for my answer.
11+
12+
13+
<reminder>
14+
15+
<sql_tables>No tables currently exist. Default tables (todos, todo_deps) will be created automatically when
16+
you first use the SQL tool.</sql_tables>
17+
18+
</reminder>
1019
- role: assistant
1120
tool_calls:
1221
- id: toolcall_0
1322
type: function
1423
function:
1524
name: ask_user
16-
arguments: '{"question":"Please pick one of the following options:","choices":["Red","Blue"],"allow_freeform":false}'
25+
arguments: '{"choices":["Red","Blue"],"question":"Please pick one of the following options:"}'
1726
- role: tool
1827
tool_call_id: toolcall_0
1928
content: "User selected: Red"

0 commit comments

Comments
 (0)