Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor: replace bare dict with dict[str, Any] in rag extractors (#35068)

wdeveloper1606b63d65d1af
diff --git a/api/core/rag/extractor/csv_extractor.py b/api/core/rag/extractor/csv_extractor.py
index 3bfae9d6bd9..19bc9cec846 100644
--- a/api/core/rag/extractor/csv_extractor.py
+++ b/api/core/rag/extractor/csv_extractor.py
@@ -1,6 +1,7 @@
"""Abstract interface for document loader implementations."""
import csv
+from typing import Any
import pandas as pd
@@ -23,7 +24,7 @@ class CSVExtractor(BaseExtractor):
encoding: str | None = None,
autodetect_encoding: bool = False,
source_column: str | None = None,
- csv_args: dict | None = None,
+ csv_args: dict[str, Any] | None = None,
):
"""Initialize with file path."""
self._file_path = file_path
diff --git a/api/core/rag/extractor/watercrawl/provider.py b/api/core/rag/extractor/watercrawl/provider.py
index 2a9403eda0f..ae7bebcb9bb 100644
--- a/api/core/rag/extractor/watercrawl/provider.py
+++ b/api/core/rag/extractor/watercrawl/provider.py
@@ -120,7 +120,7 @@ class WaterCrawlProvider:
}
def _get_results(
- self, crawl_request_id: str, query_params: dict | None = None
+ self, crawl_request_id: str, query_params: dict[str, Any] | None = None
) -> Generator[WatercrawlDocumentData, None, None]:
page = 0
page_size = 100