chore: Batch organize imports with isort.

Command: `isort /src`
PiperOrigin-RevId: 761644934
This commit is contained in:
Wei Sun (Jack)
2025-05-21 13:22:58 -07:00
committed by Copybara-Service
parent 1807e73472
commit 1773cdab96
34 changed files with 96 additions and 39 deletions
+2 -1
View File
@@ -14,7 +14,8 @@
from __future__ import annotations
from typing import Optional, TYPE_CHECKING
from typing import Optional
from typing import TYPE_CHECKING
from typing_extensions import override
+3 -1
View File
@@ -15,11 +15,13 @@
from __future__ import annotations
from types import MappingProxyType
from typing import Any, Optional
from typing import Any
from typing import Optional
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from google.genai import types
from .invocation_context import InvocationContext
+4 -1
View File
@@ -13,7 +13,10 @@
# limitations under the License.
from enum import Enum
from typing import Any, Dict, List, Optional
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from pydantic import alias_generators
from pydantic import BaseModel
+2 -1
View File
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Any, Tuple
from typing import Any
from typing import Tuple
from deprecated import deprecated
from google.genai import types as genai_types
@@ -19,7 +19,8 @@ import binascii
import copy
import dataclasses
import re
from typing import List, Optional
from typing import List
from typing import Optional
from google.genai import types
@@ -27,7 +27,6 @@ from .base_code_executor import BaseCodeExecutor
from .code_execution_utils import CodeExecutionInput
from .code_execution_utils import CodeExecutionResult
DEFAULT_IMAGE_TAG = 'adk-code-executor:latest'
@@ -15,7 +15,8 @@
import datetime
import mimetypes
import os
from typing import Any, Optional
from typing import Any
from typing import Optional
from typing_extensions import override
from vertexai.preview.extensions import Extension
+3 -1
View File
@@ -13,7 +13,9 @@
# limitations under the License.
from typing import Any, Optional, Tuple
from typing import Any
from typing import Optional
from typing import Tuple
from google.genai import types as genai_types
from pydantic import alias_generators
+2
View File
@@ -13,7 +13,9 @@
# limitations under the License.
from typing import Optional
from pydantic import BaseModel
from .eval_case import EvalCase
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from abc import ABC, abstractmethod
from abc import ABC
from abc import abstractmethod
from ..cli.cli_eval import EvalCaseResult
from ..cli.cli_eval import EvalSetResult
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from abc import ABC, abstractmethod
from abc import ABC
from abc import abstractmethod
from .eval_case import EvalCase
from .eval_set import EvalSet
+2
View File
@@ -15,7 +15,9 @@
from abc import ABC
from enum import Enum
from typing import Optional
from pydantic import BaseModel
from .eval_case import Invocation
@@ -16,7 +16,9 @@ import json
import logging
import os
import time
from typing_extensions import override
from ..cli.cli_eval import EvalCaseResult
from ..cli.cli_eval import EvalSetResult
from .eval_set_results_manager import EvalSetResultsManager
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Any, Optional
from typing import Any
from typing import Optional
from deprecated import deprecated
from google.genai import types as genai_types
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Any, cast
from typing import Any
from typing import cast
from deprecated import deprecated
from google.genai import types as genai_types
@@ -13,6 +13,7 @@
# limitations under the License.
import abc
from .example import Example
+3 -1
View File
@@ -15,7 +15,9 @@
from __future__ import annotations
import copy
from typing import AsyncGenerator, Generator, Optional
from typing import AsyncGenerator
from typing import Generator
from typing import Optional
from google.genai import types
from typing_extensions import override
+2 -1
View File
@@ -14,7 +14,8 @@
from __future__ import annotations
from abc import abstractmethod
from typing import AsyncGenerator, TYPE_CHECKING
from typing import AsyncGenerator
from typing import TYPE_CHECKING
from google.genai import types
from pydantic import BaseModel
@@ -14,7 +14,9 @@
from abc import abstractmethod
from typing import AsyncGenerator
from google.genai import types
from .llm_response import LlmResponse
+2 -1
View File
@@ -14,7 +14,8 @@
from __future__ import annotations
from typing import Any, Optional
from typing import Any
from typing import Optional
from google.genai import types
from pydantic import alias_generators
+2 -1
View File
@@ -15,7 +15,8 @@
"""Utility functions for session service."""
import base64
from typing import Any, Optional
from typing import Any
from typing import Optional
from google.genai import types
-1
View File
@@ -32,7 +32,6 @@ from .events.event import Event
from .models.llm_request import LlmRequest
from .models.llm_response import LlmResponse
tracer = trace.get_tracer('gcp.vertex.agent')
@@ -12,11 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from abc import ABC, abstractmethod
from abc import ABC
from abc import abstractmethod
import base64
import json
from typing import Any, Dict, List, Optional, Tuple
from urllib.parse import parse_qs, urlparse
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
from urllib.parse import parse_qs
from urllib.parse import urlparse
from google.auth import default as default_service_credential
from google.auth.transport.requests import Request
from google.oauth2 import service_account
@@ -14,6 +14,7 @@
import json
from typing import Optional
import google.auth
from google.auth import default as default_service_credential
import google.auth.transport.requests
@@ -14,7 +14,11 @@
import json
import time
from typing import Any, Dict, List, Optional, Tuple
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
import google.auth
from google.auth import default as default_service_credential
@@ -13,7 +13,9 @@
# limitations under the License.
import json
from typing import List, Optional
from typing import List
from typing import Optional
from google.adk.tools.application_integration_tool.clients.connections_client import ConnectionsClient
import google.auth
from google.auth import default as default_service_credential
+2 -1
View File
@@ -1,7 +1,8 @@
from abc import ABC
from abc import abstractmethod
from typing import Optional, runtime_checkable
from typing import Optional
from typing import Protocol
from typing import runtime_checkable
from ..agents.readonly_context import ReadonlyContext
from .base_tool import BaseTool
@@ -13,6 +13,7 @@
# limitations under the License.
from typing import Optional
from .long_running_tool import LongRunningFunctionTool
from .tool_context import ToolContext
@@ -12,9 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Any, Dict
from google.genai.types import Schema, Type
from typing import Any
from typing import Dict
from google.genai.types import Schema
from google.genai.types import Type
import mcp.types as mcp_types
from ..base_tool import BaseTool
@@ -15,9 +15,7 @@
import abc
from typing import Optional
from .....auth.auth_credential import (
AuthCredential,
)
from .....auth.auth_credential import AuthCredential
from .....auth.auth_schemes import AuthScheme
@@ -21,14 +21,13 @@ from google.auth.transport.requests import Request
from google.oauth2 import service_account
import google.oauth2.credentials
from .....auth.auth_credential import (
AuthCredential,
AuthCredentialTypes,
HttpAuth,
HttpCredentials,
)
from .....auth.auth_credential import AuthCredential
from .....auth.auth_credential import AuthCredentialTypes
from .....auth.auth_credential import HttpAuth
from .....auth.auth_credential import HttpCredentials
from .....auth.auth_schemes import AuthScheme
from .base_credential_exchanger import AuthCredentialMissingError, BaseAuthCredentialExchanger
from .base_credential_exchanger import AuthCredentialMissingError
from .base_credential_exchanger import BaseAuthCredentialExchanger
class ServiceAccountCredentialExchanger(BaseAuthCredentialExchanger):
@@ -14,7 +14,11 @@
import keyword
import re
from typing import Any, Dict, List, Optional, Union
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from fastapi.openapi.models import Response
from fastapi.openapi.models import Schema
@@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .openapi_spec_parser import OpenApiSpecParser, OperationEndpoint, ParsedOperation
from .openapi_spec_parser import OpenApiSpecParser
from .openapi_spec_parser import OperationEndpoint
from .openapi_spec_parser import ParsedOperation
from .openapi_toolset import OpenAPIToolset
from .operation_parser import OperationParser
from .rest_api_tool import AuthPreparationState, RestApiTool, snake_to_lower_camel, to_gemini_schema
from .rest_api_tool import AuthPreparationState
from .rest_api_tool import RestApiTool
from .rest_api_tool import snake_to_lower_camel
from .rest_api_tool import to_gemini_schema
from .tool_auth_handler import ToolAuthHandler
__all__ = [
@@ -14,7 +14,11 @@
import inspect
from textwrap import dedent
from typing import Any, Dict, List, Optional, Union
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from fastapi.encoders import jsonable_encoder
from fastapi.openapi.models import Operation