Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackone-ai"
version = "2.0.0"
description = "agents performing actions on your SaaS"
readme = "README.md"
requires-python = ">=3.11"
requires-python = ">=3.10"
authors = [
{ name = "StackOne", email = "support@stackone.com" }
]
Expand All @@ -12,6 +12,7 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down Expand Up @@ -77,7 +78,7 @@ markers = [

[tool.ruff]
line-length = 110
target-version = "py311"
target-version = "py310"

[tool.ruff.lint]
select = [
Expand Down
10 changes: 5 additions & 5 deletions stackone_ai/integrations/langgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def _ensure_langgraph() -> None:
try:
from langgraph import prebuilt as _ # noqa: F401 # ty: ignore[unresolved-import]
from langgraph import prebuilt as _ # noqa: F401
except Exception as e: # pragma: no cover
raise ImportError(
"LangGraph is not installed. Install with `pip install langgraph` or "
Expand All @@ -45,7 +45,7 @@ def to_tool_node(tools: Tools | Sequence[BaseTool], **kwargs: Any) -> Any:
for inclusion in a graph.
"""
_ensure_langgraph()
from langgraph.prebuilt import ToolNode # ty: ignore[unresolved-import]
from langgraph.prebuilt import ToolNode

langchain_tools = _to_langchain_tools(tools)
return ToolNode(langchain_tools, **kwargs)
Expand All @@ -58,7 +58,7 @@ def to_tool_executor(tools: Tools | Sequence[BaseTool], **kwargs: Any) -> Any:
This function now returns a ToolNode for compatibility.
"""
_ensure_langgraph()
from langgraph.prebuilt import ToolNode # ty: ignore[unresolved-import]
from langgraph.prebuilt import ToolNode

langchain_tools = _to_langchain_tools(tools)
return ToolNode(langchain_tools, **kwargs)
Expand All @@ -81,6 +81,6 @@ def create_react_agent(llm: Any, tools: Tools | Sequence[BaseTool], **kwargs: An
`Tools` collection from this SDK.
"""
_ensure_langgraph()
from langgraph.prebuilt import create_react_agent as _create # ty: ignore[unresolved-import]
from langgraph.prebuilt import create_react_agent as _create # ty: ignore[deprecated]

return _create(llm, _to_langchain_tools(tools), **kwargs)
return _create(llm, _to_langchain_tools(tools), **kwargs) # ty: ignore[deprecated]
6 changes: 3 additions & 3 deletions stackone_ai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json
import logging
from collections.abc import Sequence
from datetime import UTC, datetime
from datetime import datetime, timezone
from enum import Enum
from typing import Annotated, Any, ClassVar, TypeAlias, cast
from urllib.parse import quote
Expand Down Expand Up @@ -196,7 +196,7 @@ def execute(
StackOneAPIError: If the API request fails
ValueError: If the arguments are invalid
"""
datetime.now(UTC)
datetime.now(timezone.utc)
feedback_options: JsonDict = {}
result_payload: JsonDict | None = None
response_status: int | None = None
Expand Down Expand Up @@ -266,7 +266,7 @@ def execute(
status = "error"
raise StackOneError(f"Request failed: {exc}") from exc
finally:
datetime.now(UTC)
datetime.now(timezone.utc)
metadata: JsonDict = {
"http_method": self._execute_config.method,
"url": url_used,
Expand Down
Loading