8000 chore: reformat the codes using autoformat.sh · Parth0248/adk-python@ff8a3c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff8a3c9

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: reformat the codes using autoformat.sh
PiperOrigin-RevId: 762004002
1 parent a2263b1 commit ff8a3c9

23 files changed

+513
-464
lines changed

tests/unittests/agents/test_base_agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from typing import Optional
2222
from typing import Union
2323
from unittest import mock
24+
2425
from google.adk.agents.base_agent import BaseAgent
2526
from google.adk.agents.callback_context import CallbackContext
2627
from google.adk.agents.invocation_context import InvocationContext
@@ -30,6 +31,7 @@
3031
import pytest
3132
import pytest_mock
3233
from typing_extensions import override
34+
3335
from .. import testing_utils
3436

3537

tests/unittests/agents/test_live_request_queue.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import pytest
2-
from unittest.mock import MagicMock, AsyncMock, patch
3-
from google.adk.agents.live_request_queue import LiveRequest, LiveRequestQueue
1+
from unittest.mock import AsyncMock
2+
from unittest.mock import MagicMock
3+
from unittest.mock import patch
4+
5+
from google.adk.agents.live_request_queue import LiveRequest
6+
from google.adk.agents.live_request_queue import LiveRequestQueue
47
from google.genai import types
8+
import pytest
59

610

711
@pytest.mark.asyncio

tests/unittests/agents/test_llm_agent_fields.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"""Unit tests for canonical_xxx fields in LlmAgent."""
1616

1717
from typing import Any
18-
from typing import Optional, cast
18+
from typing import cast
19+
from typing import Optional
1920

2021
from google.adk.agents.callback_context import CallbackContext
2122
from google.adk.agents.invocation_context import InvocationContext
@@ -146,6 +147,7 @@ def _global_instruction_provider(ctx: ReadonlyContext) -> str:
146147
assert canonical_global_instruction == 'global instruction: state_value'
147148
assert bypass_state_injection
148149

150+
149151
async def test_async_canonical_global_instruction():
150152
async def _global_instruction_provider(ctx: ReadonlyContext) -> str:
151153
return f'global instruction: {ctx.state["state_var"]}'

tests/unittests/agents/test_readonly_context.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import pytest
2-
from unittest.mock import MagicMock
31
from types import MappingProxyType
2+
from unittest.mock import MagicMock
3+
44
from google.adk.agents.readonly_context import ReadonlyContext
5+
import pytest
56

67

78
@pytest.fixture

tests/unittests/agents/test_run_config.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import pytest
2-
import sys
31
import logging
4-
from unittest.mock import patch, ANY
2+
import sys
3+
from unittest.mock import ANY
4+
from unittest.mock import patch
5+
56
from google.adk.agents.run_config import RunConfig
7+
import pytest
68

79

810
def test_validate_max_llm_calls_valid():

tests/unittests/artifacts/test_artifact_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
import enum
1818
from typing import Optional
1919
from typing import Union
20+
from unittest import mock
2021

2122
from google.adk.artifacts import GcsArtifactService
2223
from google.adk.artifacts import InMemoryArtifactService
2324
from google.genai import types
24-
25-
from unittest import mock
2625
import pytest
2726

2827
Enum = enum.Enum

tests/unittests/auth/test_auth_handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
import copy
1616
from unittest.mock import patch
1717

18-
import pytest
1918
from fastapi.openapi.models import APIKey
2019
from fastapi.openapi.models import APIKeyIn
2120
from fastapi.openapi.models import OAuth2
2221
from fastapi.openapi.models import OAuthFlowAuthorizationCode
2322
from fastapi.openapi.models import OAuthFlows
24-
2523
from google.adk.auth.auth_credential import AuthCredential
2624
from google.adk.auth.auth_credential import AuthCredentialTypes
2725
from google.adk.auth.auth_credential import OAuth2Auth
2826
from google.adk.auth.auth_handler import AuthHandler
2927
from google.adk.auth.auth_schemes import OpenIdConnectWithConfig
3028
from google.adk.auth.auth_tool import AuthConfig
29+
import pytest
3130

3231

3332
# Mock classes for testing

0 commit comments

Comments
 (0)
0