Skip to content

Commit 3a4a829

Browse files
Merge branch 'main' into feat/add-cognee
2 parents dc011e1 + 880d43c commit 3a4a829

18 files changed

Lines changed: 105 additions & 26 deletions

File tree

.github/workflows/CI_docusaurus_sync.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,4 @@ jobs:
117117
add-paths: |
118118
docs-website
119119
body: |
120-
This PR syncs the Core Integrations API reference (${{ env.INTEGRATION_NAME }}) on Docusaurus. Just approve and merge it.
121-
reviewers: "${{ github.actor }}"
120+
This PR syncs the Core Integrations API reference (${{ env.INTEGRATION_NAME }}) on Docusaurus. Just approve and merge it.

integrations/azure_doc_intelligence/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ line-length = 120
9090
[tool.ruff.lint]
9191
select = [
9292
"A",
93+
"ANN",
9394
"ARG",
9495
"B",
9596
"C",
@@ -115,6 +116,7 @@ select = [
115116
"YTT",
116117
]
117118
ignore = [
119+
"ANN401", # Allow Any - used legitimately for dynamic types and SDK boundaries
118120
# Allow non-abstract empty methods in abstract base classes
119121
"B027",
120122
# Allow function calls in argument defaults (common Haystack pattern for Secret.from_env_var)
@@ -145,7 +147,7 @@ ban-relative-imports = "parents"
145147

146148
[tool.ruff.lint.per-file-ignores]
147149
# Tests can use magic values, assertions, and relative imports
148-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
150+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
149151

150152
[tool.coverage.run]
151153
source = ["haystack_integrations"]

integrations/azure_doc_intelligence/src/haystack_integrations/components/converters/azure_doc_intelligence/converter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(
6767
api_key: Secret = Secret.from_env_var("AZURE_DI_API_KEY"),
6868
model_id: str = "prebuilt-document",
6969
store_full_path: bool = False,
70-
):
70+
) -> None:
7171
"""
7272
Creates an AzureDocumentIntelligenceConverter component.
7373
@@ -93,7 +93,7 @@ def __init__(
9393
self.store_full_path = store_full_path
9494
self.client: DocumentIntelligenceClient | None = None
9595

96-
def warm_up(self):
96+
def warm_up(self) -> None:
9797
"""
9898
Initializes the Azure Document Intelligence client.
9999
"""

integrations/cohere/pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ line-length = 120
8484
[tool.ruff.lint]
8585
select = [
8686
"A",
87+
"ANN",
8788
"ARG",
8889
"B",
8990
"C",
@@ -124,6 +125,8 @@ ignore = [
124125
# Misc
125126
"B008",
126127
"S101",
128+
# Allow `Any` - used legitimately for dynamic types and SDK boundaries
129+
"ANN401",
127130
]
128131

129132
[tool.ruff.lint.isort]
@@ -133,8 +136,8 @@ known-first-party = ["haystack_integrations"]
133136
ban-relative-imports = "parents"
134137

135138
[tool.ruff.lint.per-file-ignores]
136-
# Tests can use magic values, assertions, and relative imports
137-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
139+
# Tests can use magic values, assertions, relative imports, and don't need type annotations
140+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
138141

139142
[tool.coverage.run]
140143
source = ["haystack_integrations"]

integrations/cohere/src/haystack_integrations/components/embedders/cohere/document_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
meta_fields_to_embed: list[str] | None = None,
5050
embedding_separator: str = "\n",
5151
embedding_type: EmbeddingTypes | None = None,
52-
):
52+
) -> None:
5353
"""
5454
:param api_key: the Cohere API key.
5555
:param model: the name of the model to use. Supported Models are:

integrations/cohere/src/haystack_integrations/components/embedders/cohere/embedding_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class EmbeddingTypes(Enum):
2121
BINARY = "binary"
2222
UBINARY = "ubinary"
2323

24-
def __str__(self):
24+
def __str__(self) -> str:
2525
return self.value
2626

2727
@staticmethod

integrations/cohere/src/haystack_integrations/components/embedders/cohere/text_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
truncate: str = "END",
4242
timeout: float = 120.0,
4343
embedding_type: EmbeddingTypes | None = None,
44-
):
44+
) -> None:
4545
"""
4646
:param api_key: the Cohere API key.
4747
:param model: the name of the model to use. Supported Models are:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def __init__(
491491
*,
492492
timeout: float | None = None,
493493
max_retries: int | None = None,
494-
):
494+
) -> None:
495495
"""
496496
Initialize the CohereChatGenerator instance.
497497

integrations/cohere/src/haystack_integrations/components/generators/cohere/generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(
3737
streaming_callback: Callable | None = None,
3838
api_base_url: str | None = None,
3939
**kwargs: Any,
40-
):
40+
) -> None:
4141
"""
4242
Instantiates a `CohereGenerator` component.
4343

integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
meta_fields_to_embed: list[str] | None = None,
4242
meta_data_separator: str = "\n",
4343
max_tokens_per_doc: int = 4096,
44-
):
44+
) -> None:
4545
"""
4646
Creates an instance of the 'CohereRanker'.
4747

0 commit comments

Comments
 (0)