From 5887d71440db7f4b85e0bb5892e32f2baee73a64 Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Wed, 18 Mar 2026 13:40:14 +0100 Subject: [PATCH] chore: enable ANN ruff ruleset for azure_doc_intelligence integration Co-Authored-By: Claude Sonnet 4.6 --- integrations/azure_doc_intelligence/pyproject.toml | 4 +++- .../components/converters/azure_doc_intelligence/converter.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/integrations/azure_doc_intelligence/pyproject.toml b/integrations/azure_doc_intelligence/pyproject.toml index 6a9e9170ae..0bd9ceaef7 100644 --- a/integrations/azure_doc_intelligence/pyproject.toml +++ b/integrations/azure_doc_intelligence/pyproject.toml @@ -90,6 +90,7 @@ line-length = 120 [tool.ruff.lint] select = [ "A", + "ANN", "ARG", "B", "C", @@ -115,6 +116,7 @@ select = [ "YTT", ] ignore = [ + "ANN401", # Allow Any - used legitimately for dynamic types and SDK boundaries # Allow non-abstract empty methods in abstract base classes "B027", # Allow function calls in argument defaults (common Haystack pattern for Secret.from_env_var) @@ -145,7 +147,7 @@ ban-relative-imports = "parents" [tool.ruff.lint.per-file-ignores] # Tests can use magic values, assertions, and relative imports -"tests/**/*" = ["PLR2004", "S101", "TID252"] +"tests/**/*" = ["PLR2004", "S101", "TID252", "ANN"] [tool.coverage.run] source = ["haystack_integrations"] diff --git a/integrations/azure_doc_intelligence/src/haystack_integrations/components/converters/azure_doc_intelligence/converter.py b/integrations/azure_doc_intelligence/src/haystack_integrations/components/converters/azure_doc_intelligence/converter.py index 55d3a2808b..5160f24c10 100644 --- a/integrations/azure_doc_intelligence/src/haystack_integrations/components/converters/azure_doc_intelligence/converter.py +++ b/integrations/azure_doc_intelligence/src/haystack_integrations/components/converters/azure_doc_intelligence/converter.py @@ -67,7 +67,7 @@ def __init__( api_key: Secret = Secret.from_env_var("AZURE_DI_API_KEY"), model_id: str = "prebuilt-document", store_full_path: bool = False, - ): + ) -> None: """ Creates an AzureDocumentIntelligenceConverter component. @@ -93,7 +93,7 @@ def __init__( self.store_full_path = store_full_path self.client: DocumentIntelligenceClient | None = None - def warm_up(self): + def warm_up(self) -> None: """ Initializes the Azure Document Intelligence client. """