Skip to content

Commit ef0c5e6

Browse files
committed
chore!: cometapi - drop Python 3.9 and use X|Y typing
1 parent 8094d0d commit ef0c5e6

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

integrations/cometapi/pyproject.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "cometapi-haystack"
77
dynamic = ["version"]
88
description = 'Use Comet API with Haystack to build AI applications with 500+ AI models.'
99
readme = "README.md"
10-
requires-python = ">=3.9"
10+
requires-python = ">=3.10"
1111
license = "Apache-2.0"
1212
keywords = []
1313
authors = [
@@ -18,15 +18,14 @@ classifiers = [
1818
"License :: OSI Approved :: Apache Software License",
1919
"Development Status :: 4 - Beta",
2020
"Programming Language :: Python",
21-
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
2625
"Programming Language :: Python :: Implementation :: CPython",
2726
"Programming Language :: Python :: Implementation :: PyPy",
2827
]
29-
dependencies = ["haystack-ai>=2.13.2",]
28+
dependencies = ["haystack-ai>=2.22.0",]
3029

3130
[project.urls]
3231
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/cometapi#readme"
@@ -85,7 +84,6 @@ module = [
8584
ignore_missing_imports = true
8685

8786
[tool.ruff]
88-
target-version = "py39"
8987
line-length = 120
9088

9189
[tool.ruff.lint]
@@ -138,10 +136,6 @@ ignore = [
138136
# Allow function call argument defaults e.g. `Secret.from_env_var`
139137
"B008",
140138
]
141-
unfixable = [
142-
# Don't touch unused imports
143-
"F401",
144-
]
145139

146140
[tool.ruff.lint.isort]
147141
known-first-party = ["haystack_integrations"]

integrations/cometapi/src/haystack_integrations/components/generators/cometapi/chat/chat_generator.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Optional, Union
1+
from typing import Any
22

33
from haystack.components.generators.chat import OpenAIChatGenerator
44
from haystack.dataclasses import StreamingCallbackT
@@ -34,13 +34,13 @@ def __init__(
3434
*,
3535
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
3636
model: str = "gpt-5-mini",
37-
streaming_callback: Optional[StreamingCallbackT] = None,
38-
generation_kwargs: Optional[dict[str, Any]] = None,
39-
timeout: Optional[int] = None,
40-
max_retries: Optional[int] = None,
41-
tools: Optional[Union[list[Union[Tool, Toolset]], Toolset]] = None,
37+
streaming_callback: StreamingCallbackT | None = None,
38+
generation_kwargs: dict[str, Any] | None = None,
39+
timeout: int | None = None,
40+
max_retries: int | None = None,
41+
tools: list[Tool | Toolset] | Toolset | None = None,
4242
tools_strict: bool = False,
43-
http_client_kwargs: Optional[dict[str, Any]] = None,
43+
http_client_kwargs: dict[str, Any] | None = None,
4444
):
4545
api_base_url = "https://api.cometapi.com/v1"
4646

0 commit comments

Comments
 (0)