From 745e496c076cd4e88775cfcb9130986edfdc4e5e Mon Sep 17 00:00:00 2001 From: Tyler White Date: Wed, 12 Feb 2025 11:01:26 -0500 Subject: [PATCH 1/2] perf: add future annotations imports --- agent_gateway/agents/tools.py | 3 +++ agent_gateway/executors/schema.py | 2 ++ agent_gateway/gateway/constants.py | 2 ++ agent_gateway/gateway/gateway.py | 1 + agent_gateway/gateway/output_parser.py | 1 + agent_gateway/gateway/planner.py | 3 +++ agent_gateway/tools/logger.py | 1 + agent_gateway/tools/snowflake_prompts.py | 1 + agent_gateway/tools/snowflake_tools.py | 1 + agent_gateway/tools/utils.py | 3 ++- 10 files changed, 17 insertions(+), 1 deletion(-) diff --git a/agent_gateway/agents/tools.py b/agent_gateway/agents/tools.py index ea40bbf..f0a2b67 100644 --- a/agent_gateway/agents/tools.py +++ b/agent_gateway/agents/tools.py @@ -10,7 +10,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from typing import List, Optional + from langchain.callbacks.manager import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, diff --git a/agent_gateway/executors/schema.py b/agent_gateway/executors/schema.py index f80f2bc..e95296e 100644 --- a/agent_gateway/executors/schema.py +++ b/agent_gateway/executors/schema.py @@ -10,6 +10,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + from pydantic import BaseModel diff --git a/agent_gateway/gateway/constants.py b/agent_gateway/gateway/constants.py index 53d2c79..8761ce5 100644 --- a/agent_gateway/gateway/constants.py +++ b/agent_gateway/gateway/constants.py @@ -10,6 +10,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations + END_OF_PLAN = "" FUSION_FINISH = "Finish" FUSION_REPLAN = "Replan" diff --git a/agent_gateway/gateway/gateway.py b/agent_gateway/gateway/gateway.py index 64274ca..1277b36 100644 --- a/agent_gateway/gateway/gateway.py +++ b/agent_gateway/gateway/gateway.py @@ -9,6 +9,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import asyncio import json diff --git a/agent_gateway/gateway/output_parser.py b/agent_gateway/gateway/output_parser.py index db3dc1b..b1edada 100644 --- a/agent_gateway/gateway/output_parser.py +++ b/agent_gateway/gateway/output_parser.py @@ -9,6 +9,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import ast import re diff --git a/agent_gateway/gateway/planner.py b/agent_gateway/gateway/planner.py index 9009b8e..ccd7afa 100644 --- a/agent_gateway/gateway/planner.py +++ b/agent_gateway/gateway/planner.py @@ -10,8 +10,11 @@ # See the License for the specific language governing permissions and # limitations under the License. + """Cortex gateway Planner""" +from __future__ import annotations + import asyncio import json import re diff --git a/agent_gateway/tools/logger.py b/agent_gateway/tools/logger.py index 77873fb..3d8c1a3 100644 --- a/agent_gateway/tools/logger.py +++ b/agent_gateway/tools/logger.py @@ -9,6 +9,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import logging import os diff --git a/agent_gateway/tools/snowflake_prompts.py b/agent_gateway/tools/snowflake_prompts.py index f324096..3a4c4ea 100644 --- a/agent_gateway/tools/snowflake_prompts.py +++ b/agent_gateway/tools/snowflake_prompts.py @@ -9,6 +9,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations from agent_gateway.gateway.constants import END_OF_PLAN, FUSION_FINISH, FUSION_REPLAN diff --git a/agent_gateway/tools/snowflake_tools.py b/agent_gateway/tools/snowflake_tools.py index 2faeec8..d5f841e 100644 --- a/agent_gateway/tools/snowflake_tools.py +++ b/agent_gateway/tools/snowflake_tools.py @@ -9,6 +9,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations import asyncio import inspect diff --git a/agent_gateway/tools/utils.py b/agent_gateway/tools/utils.py index 0efc236..8d53ba5 100644 --- a/agent_gateway/tools/utils.py +++ b/agent_gateway/tools/utils.py @@ -9,9 +9,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import annotations -import io import asyncio +import io import json from collections import deque from textwrap import dedent From d2e8a7fe35449ab9cb09883763b90984f875907c Mon Sep 17 00:00:00 2001 From: Tyler White Date: Wed, 12 Feb 2025 11:09:12 -0500 Subject: [PATCH 2/2] chore: add submodule __init__ files --- agent_gateway/agents/__init__.py | 0 agent_gateway/chains/__init__.py | 0 agent_gateway/executors/__init__.py | 0 agent_gateway/gateway/__init__.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 agent_gateway/agents/__init__.py create mode 100644 agent_gateway/chains/__init__.py create mode 100644 agent_gateway/executors/__init__.py create mode 100644 agent_gateway/gateway/__init__.py diff --git a/agent_gateway/agents/__init__.py b/agent_gateway/agents/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/agent_gateway/chains/__init__.py b/agent_gateway/chains/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/agent_gateway/executors/__init__.py b/agent_gateway/executors/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/agent_gateway/gateway/__init__.py b/agent_gateway/gateway/__init__.py new file mode 100644 index 0000000..e69de29