chore: Replace imports by importing from actual module instead of from package (__init__.py)

PiperOrigin-RevId: 786342250
This commit is contained in:
Xiang (Sean) Zhou
2025-07-23 10:49:43 -07:00
committed by Copybara-Service
parent 430b82024f
commit 927c75f0ee
110 changed files with 221 additions and 218 deletions
@@ -15,7 +15,7 @@
from google.adk.agents.llm_agent import Agent
from google.adk.agents.loop_agent import LoopAgent
from google.adk.agents.sequential_agent import SequentialAgent
from google.adk.tools import exit_loop
from google.adk.tools.exit_loop_tool import exit_loop
from google.genai.types import Part
from ... import testing_utils
@@ -20,8 +20,8 @@ from typing import List
from typing import Optional
from unittest import mock
from google.adk.agents import Agent
from google.adk.agents.callback_context import CallbackContext
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows.functions import handle_function_calls_async
from google.adk.tools.function_tool import FunctionTool
@@ -16,7 +16,7 @@
from unittest.mock import AsyncMock
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow
from google.adk.models.llm_request import LlmRequest
from google.adk.models.llm_response import LlmResponse
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow
from google.adk.models.llm_response import LlmResponse
from google.genai import types
@@ -14,9 +14,9 @@
from unittest import mock
from google.adk.agents import Agent
from google.adk.agents.live_request_queue import LiveRequest
from google.adk.agents.live_request_queue import LiveRequestQueue
from google.adk.agents.llm_agent import Agent
from google.adk.agents.run_config import RunConfig
from google.adk.flows.llm_flows.base_llm_flow import BaseLlmFlow
from google.adk.models.llm_request import LlmRequest
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows import contents
from google.adk.flows.llm_flows.contents import _convert_foreign_event
@@ -20,7 +20,7 @@ from google.adk.flows.llm_flows.contents import _get_contents
from google.adk.flows.llm_flows.contents import _merge_function_response_events
from google.adk.flows.llm_flows.contents import _rearrange_events_for_async_function_responses_in_history
from google.adk.flows.llm_flows.contents import _rearrange_events_for_latest_function_response
from google.adk.models import LlmRequest
from google.adk.models.llm_request import LlmRequest
from google.genai import types
import pytest
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.tools import ToolContext
from google.adk.agents.llm_agent import Agent
from google.adk.tools.long_running_tool import LongRunningFunctionTool
from google.adk.tools.tool_context import ToolContext
from google.genai.types import Part
from ... import testing_utils
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event_actions import EventActions
from google.adk.tools import ToolContext
from google.adk.tools.tool_context import ToolContext
from google.genai import types
import pytest
@@ -18,14 +18,14 @@ from typing import Optional
from fastapi.openapi.models import OAuth2
from fastapi.openapi.models import OAuthFlowAuthorizationCode
from fastapi.openapi.models import OAuthFlows
from google.adk.agents import Agent
from google.adk.auth import AuthConfig
from google.adk.auth import AuthCredential
from google.adk.auth import AuthCredentialTypes
from google.adk.auth import OAuth2Auth
from google.adk.agents.llm_agent import Agent
from google.adk.auth.auth_credential import AuthCredential
from google.adk.auth.auth_credential import AuthCredentialTypes
from google.adk.auth.auth_credential import OAuth2Auth
from google.adk.auth.auth_tool import AuthConfig
from google.adk.auth.auth_tool import AuthToolArguments
from google.adk.flows.llm_flows import functions
from google.adk.tools import AuthToolArguments
from google.adk.tools import ToolContext
from google.adk.tools.tool_context import ToolContext
from google.genai import types
from ... import testing_utils
@@ -14,7 +14,7 @@
from typing import Any
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.genai import types
from ... import testing_utils
@@ -16,12 +16,12 @@ from typing import Any
from typing import AsyncGenerator
from typing import Callable
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows.functions import find_matching_function_call
from google.adk.sessions.session import Session
from google.adk.tools import ToolContext
from google.adk.tools.function_tool import FunctionTool
from google.adk.tools.tool_context import ToolContext
from google.genai import types
import pytest
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.flows.llm_flows import identity
from google.adk.models import LlmRequest
from google.adk.models.llm_request import LlmRequest
from google.genai import types
import pytest
@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.agents.readonly_context import ReadonlyContext
from google.adk.flows.llm_flows import instructions
from google.adk.models import LlmRequest
from google.adk.sessions import Session
from google.adk.models.llm_request import LlmRequest
from google.adk.sessions.session import Session
from google.genai import types
import pytest
@@ -20,7 +20,7 @@ from typing import List
from typing import Optional
from unittest import mock
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows.functions import handle_function_calls_live
from google.adk.tools.function_tool import FunctionTool
@@ -15,10 +15,10 @@
from typing import Any
from typing import Optional
from google.adk.agents import Agent
from google.adk.agents.callback_context import CallbackContext
from google.adk.models import LlmRequest
from google.adk.models import LlmResponse
from google.adk.agents.llm_agent import Agent
from google.adk.models.llm_request import LlmRequest
from google.adk.models.llm_response import LlmResponse
from google.genai import types
from pydantic import BaseModel
import pytest
@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.agents import Agent
from google.adk.tools import ToolContext
from google.adk.agents.llm_agent import Agent
from google.adk.tools.tool_context import ToolContext
from google.genai.types import Part
from pydantic import BaseModel
@@ -14,10 +14,10 @@
from typing import Optional
from google.adk.agents import Agent
from google.adk.agents.callback_context import CallbackContext
from google.adk.models import LlmRequest
from google.adk.models import LlmResponse
from google.adk.agents.llm_agent import Agent
from google.adk.models.llm_request import LlmRequest
from google.adk.models.llm_response import LlmResponse
from google.adk.plugins.base_plugin import BasePlugin
from google.genai import types
import pytest
@@ -16,7 +16,7 @@ from typing import Any
from typing import Dict
from typing import Optional
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows.functions import handle_function_calls_async
from google.adk.plugins.base_plugin import BasePlugin
@@ -14,9 +14,9 @@
from typing import Any
from google.adk.agents import Agent
from google.adk.tools import BaseTool
from google.adk.tools import ToolContext
from google.adk.agents.llm_agent import Agent
from google.adk.tools.base_tool import BaseTool
from google.adk.tools.tool_context import ToolContext
from google.genai import types
from google.genai.types import Part
from pydantic import BaseModel
@@ -18,7 +18,7 @@ from typing import Optional
from unittest import mock
from google.adk import telemetry
from google.adk.agents import Agent
from google.adk.agents.llm_agent import Agent
from google.adk.events.event import Event
from google.adk.flows.llm_flows.functions import handle_function_calls_async
from google.adk.tools.function_tool import FunctionTool