Skip to content

Commit f2fac47

Browse files
committed
fix: code quality
1 parent d212207 commit f2fac47

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/agentgateway/unit/test_converters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def test_optional_fields_not_required_in_args_schema(self):
9898

9999
result = mcp_tool_to_langchain(tool, AsyncMock(return_value="result"), lambda: "token")
100100

101+
from pydantic import BaseModel
102+
103+
assert result.args_schema is not None and isinstance(result.args_schema, type) and issubclass(result.args_schema, BaseModel)
101104
fields = result.args_schema.model_fields
102105
assert fields["eventid"].is_required(), "eventid should be required"
103106
assert not fields["showdeclinedreason"].is_required(), "showdeclinedreason should be optional"

tests/core/integration/telemetry/_agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def build_langgraph_agent():
1717
from typing import Annotated
1818

1919
from langchain_core.messages import BaseMessage
20-
from langchain_litellm import ChatLiteLLM # ty: ignore[unresolved-import]
21-
from langgraph.graph import END, StateGraph # ty: ignore[unresolved-import]
22-
from langgraph.graph.message import add_messages # ty: ignore[unresolved-import]
20+
from langchain_litellm import ChatLiteLLM
21+
from langgraph.graph import END, StateGraph
22+
from langgraph.graph.message import add_messages
2323
except ImportError:
2424
pytest.skip("langchain-litellm or langgraph not installed")
2525

tests/core/integration/telemetry/test_telemetry_bdd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _llm_call():
127127
Uses ChatLiteLLM so Traceloop's LangChain instrumentor fires and emits a span
128128
with gen_ai.usage.* token counts.
129129
"""
130-
from langchain_litellm import ChatLiteLLM # ty: ignore[unresolved-import]
130+
from langchain_litellm import ChatLiteLLM
131131
from langchain_core.messages import HumanMessage as LCHumanMessage
132132
model_name = os.environ.get("AICORE_MODEL", "anthropic--claude-4.5-sonnet")
133133
llm = ChatLiteLLM(model=f"sap/{model_name}")

0 commit comments

Comments
 (0)