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

View File

@ -14,7 +14,8 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, TYPE_CHECKING from typing import Optional
from typing import TYPE_CHECKING
from typing_extensions import override from typing_extensions import override

View File

@ -15,11 +15,13 @@
from __future__ import annotations from __future__ import annotations
from types import MappingProxyType from types import MappingProxyType
from typing import Any, Optional from typing import Any
from typing import Optional
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
if TYPE_CHECKING: if TYPE_CHECKING:
from google.genai import types from google.genai import types
from .invocation_context import InvocationContext from .invocation_context import InvocationContext

View File

@ -13,7 +13,10 @@
# limitations under the License. # limitations under the License.
from enum import Enum 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 alias_generators
from pydantic import BaseModel from pydantic import BaseModel

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from typing import Any, Tuple from typing import Any
from typing import Tuple
from deprecated import deprecated from deprecated import deprecated
from google.genai import types as genai_types from google.genai import types as genai_types

View File

@ -19,7 +19,8 @@ import binascii
import copy import copy
import dataclasses import dataclasses
import re import re
from typing import List, Optional from typing import List
from typing import Optional
from google.genai import types from google.genai import types

View File

@ -27,7 +27,6 @@ from .base_code_executor import BaseCodeExecutor
from .code_execution_utils import CodeExecutionInput from .code_execution_utils import CodeExecutionInput
from .code_execution_utils import CodeExecutionResult from .code_execution_utils import CodeExecutionResult
DEFAULT_IMAGE_TAG = 'adk-code-executor:latest' DEFAULT_IMAGE_TAG = 'adk-code-executor:latest'

View File

@ -15,7 +15,8 @@
import datetime import datetime
import mimetypes import mimetypes
import os import os
from typing import Any, Optional from typing import Any
from typing import Optional
from typing_extensions import override from typing_extensions import override
from vertexai.preview.extensions import Extension from vertexai.preview.extensions import Extension

View File

@ -13,7 +13,9 @@
# limitations under the License. # 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 google.genai import types as genai_types
from pydantic import alias_generators from pydantic import alias_generators

View File

@ -13,7 +13,9 @@
# limitations under the License. # limitations under the License.
from typing import Optional from typing import Optional
from pydantic import BaseModel from pydantic import BaseModel
from .eval_case import EvalCase from .eval_case import EvalCase

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 EvalCaseResult
from ..cli.cli_eval import EvalSetResult from ..cli.cli_eval import EvalSetResult

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from abc import ABC, abstractmethod from abc import ABC
from abc import abstractmethod
from .eval_case import EvalCase from .eval_case import EvalCase
from .eval_set import EvalSet from .eval_set import EvalSet

View File

@ -15,7 +15,9 @@
from abc import ABC from abc import ABC
from enum import Enum from enum import Enum
from typing import Optional from typing import Optional
from pydantic import BaseModel from pydantic import BaseModel
from .eval_case import Invocation from .eval_case import Invocation

View File

@ -16,7 +16,9 @@ import json
import logging import logging
import os import os
import time import time
from typing_extensions import override from typing_extensions import override
from ..cli.cli_eval import EvalCaseResult from ..cli.cli_eval import EvalCaseResult
from ..cli.cli_eval import EvalSetResult from ..cli.cli_eval import EvalSetResult
from .eval_set_results_manager import EvalSetResultsManager from .eval_set_results_manager import EvalSetResultsManager

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from typing import Any, Optional from typing import Any
from typing import Optional
from deprecated import deprecated from deprecated import deprecated
from google.genai import types as genai_types from google.genai import types as genai_types

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from typing import Any, cast from typing import Any
from typing import cast
from deprecated import deprecated from deprecated import deprecated
from google.genai import types as genai_types from google.genai import types as genai_types

View File

@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
import abc import abc
from .example import Example from .example import Example

View File

@ -15,7 +15,9 @@
from __future__ import annotations from __future__ import annotations
import copy 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 google.genai import types
from typing_extensions import override from typing_extensions import override

View File

@ -14,7 +14,8 @@
from __future__ import annotations from __future__ import annotations
from abc import abstractmethod 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 google.genai import types
from pydantic import BaseModel from pydantic import BaseModel

View File

@ -14,7 +14,9 @@
from abc import abstractmethod from abc import abstractmethod
from typing import AsyncGenerator from typing import AsyncGenerator
from google.genai import types from google.genai import types
from .llm_response import LlmResponse from .llm_response import LlmResponse

View File

@ -14,7 +14,8 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Optional from typing import Any
from typing import Optional
from google.genai import types from google.genai import types
from pydantic import alias_generators from pydantic import alias_generators

View File

@ -15,7 +15,8 @@
"""Utility functions for session service.""" """Utility functions for session service."""
import base64 import base64
from typing import Any, Optional from typing import Any
from typing import Optional
from google.genai import types from google.genai import types

View File

@ -32,7 +32,6 @@ from .events.event import Event
from .models.llm_request import LlmRequest from .models.llm_request import LlmRequest
from .models.llm_response import LlmResponse from .models.llm_response import LlmResponse
tracer = trace.get_tracer('gcp.vertex.agent') tracer = trace.get_tracer('gcp.vertex.agent')

View File

@ -12,11 +12,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from abc import ABC, abstractmethod from abc import ABC
from abc import abstractmethod
import base64 import base64
import json import json
from typing import Any, Dict, List, Optional, Tuple from typing import Any
from urllib.parse import parse_qs, urlparse 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 import default as default_service_credential
from google.auth.transport.requests import Request from google.auth.transport.requests import Request
from google.oauth2 import service_account from google.oauth2 import service_account

View File

@ -14,6 +14,7 @@
import json import json
from typing import Optional from typing import Optional
import google.auth import google.auth
from google.auth import default as default_service_credential from google.auth import default as default_service_credential
import google.auth.transport.requests import google.auth.transport.requests

View File

@ -14,7 +14,11 @@
import json import json
import time 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 import google.auth
from google.auth import default as default_service_credential from google.auth import default as default_service_credential

View File

@ -13,7 +13,9 @@
# limitations under the License. # limitations under the License.
import json 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 from google.adk.tools.application_integration_tool.clients.connections_client import ConnectionsClient
import google.auth import google.auth
from google.auth import default as default_service_credential from google.auth import default as default_service_credential

View File

@ -1,7 +1,8 @@
from abc import ABC from abc import ABC
from abc import abstractmethod from abc import abstractmethod
from typing import Optional, runtime_checkable from typing import Optional
from typing import Protocol from typing import Protocol
from typing import runtime_checkable
from ..agents.readonly_context import ReadonlyContext from ..agents.readonly_context import ReadonlyContext
from .base_tool import BaseTool from .base_tool import BaseTool

View File

@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
from typing import Optional from typing import Optional
from .long_running_tool import LongRunningFunctionTool from .long_running_tool import LongRunningFunctionTool
from .tool_context import ToolContext from .tool_context import ToolContext

View File

@ -12,9 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from typing import Any, Dict from typing import Any
from google.genai.types import Schema, Type from typing import Dict
from google.genai.types import Schema
from google.genai.types import Type
import mcp.types as mcp_types import mcp.types as mcp_types
from ..base_tool import BaseTool from ..base_tool import BaseTool

View File

@ -15,9 +15,7 @@
import abc import abc
from typing import Optional from typing import Optional
from .....auth.auth_credential import ( from .....auth.auth_credential import AuthCredential
AuthCredential,
)
from .....auth.auth_schemes import AuthScheme from .....auth.auth_schemes import AuthScheme

View File

@ -21,14 +21,13 @@ from google.auth.transport.requests import Request
from google.oauth2 import service_account from google.oauth2 import service_account
import google.oauth2.credentials import google.oauth2.credentials
from .....auth.auth_credential import ( from .....auth.auth_credential import AuthCredential
AuthCredential, from .....auth.auth_credential import AuthCredentialTypes
AuthCredentialTypes, from .....auth.auth_credential import HttpAuth
HttpAuth, from .....auth.auth_credential import HttpCredentials
HttpCredentials,
)
from .....auth.auth_schemes import AuthScheme 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): class ServiceAccountCredentialExchanger(BaseAuthCredentialExchanger):

View File

@ -14,7 +14,11 @@
import keyword import keyword
import re 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 Response
from fastapi.openapi.models import Schema from fastapi.openapi.models import Schema

View File

@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 .openapi_toolset import OpenAPIToolset
from .operation_parser import OperationParser 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 from .tool_auth_handler import ToolAuthHandler
__all__ = [ __all__ = [

View File

@ -14,7 +14,11 @@
import inspect import inspect
from textwrap import dedent 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.encoders import jsonable_encoder
from fastapi.openapi.models import Operation from fastapi.openapi.models import Operation