Skip to content

Commit fccad71

Browse files
Merge branch 'main' into feat/add-cognee
2 parents 3a4a829 + 1f89211 commit fccad71

30 files changed

Lines changed: 174 additions & 63 deletions

File tree

integrations/faiss/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ line-length = 120
8989
[tool.ruff.lint]
9090
select = [
9191
"A",
92+
"ANN",
9293
"ARG",
9394
"B",
9495
"C",
@@ -133,6 +134,8 @@ ignore = [
133134
"ARG002",
134135
# Allow assertions
135136
"S101",
137+
# Allow `Any` - used legitimately for dynamic types and SDK boundaries
138+
"ANN401",
136139
]
137140
exclude = ["example"]
138141

@@ -144,7 +147,7 @@ ban-relative-imports = "parents"
144147

145148
[tool.ruff.lint.per-file-ignores]
146149
# Tests can use magic values, assertions, and relative imports
147-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
150+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
148151
"example/**/*" = ["T201"]
149152

150153
[tool.coverage.run]

integrations/faiss/src/haystack_integrations/components/retrievers/faiss/embedding_retriever.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
filters: dict[str, Any] | None = None,
6060
top_k: int = 10,
6161
filter_policy: str | FilterPolicy = FilterPolicy.REPLACE,
62-
):
62+
) -> None:
6363
"""
6464
:param document_store: An instance of `FAISSDocumentStore`.
6565
:param filters: Filters applied to the retrieved Documents at initialisation time. At runtime, these are merged

integrations/faiss/src/haystack_integrations/document_stores/faiss/document_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
index_path: str | None = None,
3535
index_string: str = "Flat",
3636
embedding_dim: int = 768,
37-
):
37+
) -> None:
3838
"""
3939
Initializes the FAISSDocumentStore.
4040
@@ -61,7 +61,7 @@ def __init__(
6161
else:
6262
self._create_new_index()
6363

64-
def _create_new_index(self):
64+
def _create_new_index(self) -> None:
6565
"""Creates a new FAISS index."""
6666
try:
6767
# We use IndexIDMap to support add_with_ids

integrations/fastembed/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ line-length = 120
7979
[tool.ruff.lint]
8080
select = [
8181
"A",
82+
"ANN",
8283
"ARG",
8384
"B",
8485
"C",
@@ -115,6 +116,8 @@ ignore = [
115116
"S105",
116117
"S106",
117118
"S107",
119+
# Allow `Any` - used legitimately for dynamic types and SDK boundaries
120+
"ANN401",
118121
# Ignore complexity
119122
"C901",
120123
"PLR0911",
@@ -131,7 +134,7 @@ ban-relative-imports = "parents"
131134

132135
[tool.ruff.lint.per-file-ignores]
133136
# Tests can use magic values, assertions, and relative imports
134-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
137+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
135138
# examples can contain "print" commands
136139
"examples/**/*" = ["T201", "E501"]
137140

integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/embedding_backend/fastembed_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
cache_dir: str | None = None,
4545
threads: int | None = None,
4646
local_files_only: bool = False,
47-
):
47+
) -> None:
4848
self.model = TextEmbedding(
4949
model_name=model_name, cache_dir=cache_dir, threads=threads, local_files_only=local_files_only
5050
)
@@ -103,7 +103,7 @@ def __init__(
103103
threads: int | None = None,
104104
local_files_only: bool = False,
105105
model_kwargs: dict[str, Any] | None = None,
106-
):
106+
) -> None:
107107
model_kwargs = model_kwargs or {}
108108

109109
self.model = SparseTextEmbedding(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
local_files_only: bool = False,
4747
meta_fields_to_embed: list[str] | None = None,
4848
meta_data_separator: str = "\n",
49-
):
49+
) -> None:
5050
"""
5151
Creates an instance of the 'FastembedRanker'.
5252
@@ -114,7 +114,7 @@ def from_dict(cls, data: dict[str, Any]) -> "FastembedRanker":
114114
"""
115115
return default_from_dict(cls, data)
116116

117-
def warm_up(self):
117+
def warm_up(self) -> None:
118118
"""
119119
Initializes the component.
120120
"""

integrations/firecrawl/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ line-length = 120
8888
[tool.ruff.lint]
8989
select = [
9090
"A",
91+
"ANN",
9192
"ARG",
9293
"B",
9394
"C",
@@ -123,6 +124,8 @@ ignore = [
123124
"S105",
124125
"S106",
125126
"S107",
127+
# Allow `Any` - used legitimately for dynamic types and SDK boundaries
128+
"ANN401",
126129
# Ignore complexity
127130
"C901",
128131
"PLR0911",
@@ -143,7 +146,7 @@ ban-relative-imports = "parents"
143146

144147
[tool.ruff.lint.per-file-ignores]
145148
# Tests can use magic values, assertions, and relative imports
146-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
149+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
147150

148151
[tool.coverage.run]
149152
source = ["haystack_integrations"]

integrations/github/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ line-length = 120
8181
[tool.ruff.lint]
8282
select = [
8383
"A",
84+
"ANN",
8485
"ARG",
8586
"B",
8687
"C",
@@ -121,6 +122,8 @@ ignore = [
121122
# Misc
122123
"B008",
123124
"S101",
125+
# Allow `Any` - used legitimately for dynamic types and SDK boundaries
126+
"ANN401",
124127
]
125128

126129
[tool.ruff.lint.isort]
@@ -131,7 +134,7 @@ ban-relative-imports = "parents"
131134

132135
[tool.ruff.lint.per-file-ignores]
133136
# Tests can use magic values, assertions, and relative imports
134-
"tests/**/*" = ["PLR2004", "S101", "TID252"]
137+
"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"]
135138
# Ignore RUF001 for all files in the prompts directory
136139
"src/haystack_integrations/components/prompts/**/*" = ["RUF001"]
137140

integrations/github/src/haystack_integrations/components/connectors/github/file_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(
8282
repo: str | None = None,
8383
branch: str = "main",
8484
raise_on_failure: bool = True,
85-
):
85+
) -> None:
8686
"""
8787
Initialize the component.
8888

integrations/github/src/haystack_integrations/components/connectors/github/issue_commenter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(
4141
github_token: Secret = Secret.from_env_var("GITHUB_TOKEN"),
4242
raise_on_failure: bool = True,
4343
retry_attempts: int = 2,
44-
):
44+
) -> None:
4545
"""
4646
Initialize the component.
4747

0 commit comments

Comments
 (0)