Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit433c423

Browse files
wuliang229copybara-github
authored andcommitted
chore: include contributing/ folder in autoformat.sh
Also formatted the files in that folder in this same commit.PiperOrigin-RevId: 766885306
1 parente99f87d commit433c423

File tree

13 files changed

+34
-26
lines changed

13 files changed

+34
-26
lines changed

‎autoformat.sh‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ echo '---------------------------------------'
4141
isort tests/
4242
echo'All done! ✨ 🍰 ✨'
4343

44+
echo'---------------------------------------'
45+
echo'| Organizing imports for contributing/...'
46+
echo'---------------------------------------'
47+
48+
isort contributing/
49+
echo'All done! ✨ 🍰 ✨'
50+
4451
echo'---------------------------------------'
4552
echo'| Auto-formatting src/...'
4653
echo'---------------------------------------'
@@ -52,3 +59,9 @@ echo '| Auto-formatting tests/...'
5259
echo'---------------------------------------'
5360

5461
find -L tests/ -type f -name"*.py" -exec pyink --config pyproject.toml {} +
62+
63+
echo'---------------------------------------'
64+
echo'| Auto-formatting contributing/...'
65+
echo'---------------------------------------'
66+
67+
find -L contributing/ -type f -name"*.py" -exec pyink --config pyproject.toml {} +

‎contributing/samples/artifact_save_text/agent.py‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@
1919

2020

2121
asyncdeflog_query(tool_context:ToolContext,query:str):
22-
"""Saves the provided query string as a 'text/plain' artifact named 'query'."""
23-
query_bytes=query.encode('utf-8')
24-
artifact_part=types.Part(
25-
inline_data=types.Blob(
26-
mime_type='text/plain',
27-
data=query_bytes
28-
)
29-
)
30-
awaittool_context.save_artifact('query',artifact_part)
22+
"""Saves the provided query string as a 'text/plain' artifact named 'query'."""
23+
query_bytes=query.encode('utf-8')
24+
artifact_part=types.Part(
25+
inline_data=types.Blob(mime_type='text/plain',data=query_bytes)
26+
)
27+
awaittool_context.save_artifact('query',artifact_part)
3128

3229

3330
root_agent=Agent(

‎contributing/samples/bigquery/agent.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
fromgoogle.adk.tools.bigqueryimportBigQueryToolset
2020
importgoogle.auth
2121

22-
2322
RUN_WITH_ADC=False
2423

2524

‎contributing/samples/generate_image/agent.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
fromgoogle.genaiimportClient
16-
fromgoogle.genaiimporttypes
17-
1815
fromgoogle.adkimportAgent
1916
fromgoogle.adk.toolsimportload_artifacts
2017
fromgoogle.adk.toolsimportToolContext
18+
fromgoogle.genaiimportClient
19+
fromgoogle.genaiimporttypes
2120

2221
# Only Vertex AI supports image generation for now.
2322
client=Client()

‎contributing/samples/google_search_agent/agent.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
fromgoogle.genaiimportClient
16-
1715
fromgoogle.adkimportAgent
1816
fromgoogle.adk.toolsimportgoogle_search
17+
fromgoogle.genaiimportClient
1918

2019
# Only Vertex AI supports image generation for now.
2120
client=Client()

‎contributing/samples/hello_world/agent.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ async def check_prime(nums: list[int]) -> str:
6565
elsef"{', '.join(str(num)fornuminprimes)} are prime numbers."
6666
)
6767

68+
6869
root_agent=Agent(
6970
model='gemini-2.0-flash',
7071
name='data_processing_agent',

‎contributing/samples/human_in_loop/main.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,23 @@
1313
# limitations under the License.
1414

1515
importasyncio
16+
importos
17+
fromtypingimportAny
18+
fromtypingimportUnion
1619

1720
importagent
1821
fromdotenvimportload_dotenv
19-
fromtypingimportAny
20-
fromtypingimportUnion
2122
fromgoogle.adk.agentsimportAgent
2223
fromgoogle.adk.eventsimportEvent
2324
fromgoogle.adk.runnersimportRunner
24-
fromgoogle.adk.toolsimportLongRunningFunctionTool
2525
fromgoogle.adk.sessionsimportInMemorySessionService
26+
fromgoogle.adk.toolsimportLongRunningFunctionTool
2627
fromgoogle.genaiimporttypes
27-
28-
importos
2928
fromopentelemetryimporttrace
3029
fromopentelemetry.exporter.cloud_traceimportCloudTraceSpanExporter
3130
fromopentelemetry.sdk.traceimportexport
3231
fromopentelemetry.sdk.traceimportTracerProvider
3332

34-
3533
load_dotenv(override=True)
3634

3735
APP_NAME="human_in_the_loop"

‎contributing/samples/jira_agent/agent.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
# limitations under the License.
1414

1515
fromgoogle.adk.agentsimportAgent
16+
1617
from .toolsimportjira_tool
1718

1819
root_agent=Agent(
1920
model='gemini-2.0-flash-001',
2021
name='jira_connector_agent',
21-
description="This agent helps search issues in JIRA",
22+
description='This agent helps search issues in JIRA',
2223
instruction="""
2324
To start with, greet the user
2425
First, you will be given a description of what you can do.
@@ -49,5 +50,4 @@
4950
- I currently support only **GET** and **LIST** operations.
5051
""",
5152
tools=jira_tool.get_tools(),
52-
5353
)

‎contributing/samples/jira_agent/tools.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
jira_tool=ApplicationIntegrationToolset(
1818
project="your-gcp-project-id",# replace with your GCP project ID
1919
location="your-regions",# replace your regions
20-
connection="your-integration-connection-name",#replace with your connection name
20+
connection="your-integration-connection-name",#replace with your connection name
2121
entity_operations={
2222
"Issues": ["GET","LIST"],
2323
},
@@ -30,5 +30,4 @@
3030
This tool is to call an integration to search for issues in JIRA
3131
3232
""",
33-
3433
)

‎contributing/samples/mcp_sse_agent/filesystem_server.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
importos
1717
frompathlibimportPath
1818
importsys
19+
1920
frommcp.server.fastmcpimportFastMCP
2021

2122
# Create an MCP server with a name

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp