Skip to content

Commit bda5636

Browse files
julian-rischclaude
andauthored
chore: enable ANN ruff ruleset for azure_doc_intelligence integration (#2981)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4a5b3ee commit bda5636

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

  • integrations/azure_doc_intelligence

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
"""

0 commit comments

Comments
 (0)