mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
refactor: replace bare dict with dict[str, Any] in rag extractors (#35068)
This commit is contained in:
parent
08f3133414
commit
06b63d65d1
@ -1,6 +1,7 @@
|
|||||||
"""Abstract interface for document loader implementations."""
|
"""Abstract interface for document loader implementations."""
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ class CSVExtractor(BaseExtractor):
|
|||||||
encoding: str | None = None,
|
encoding: str | None = None,
|
||||||
autodetect_encoding: bool = False,
|
autodetect_encoding: bool = False,
|
||||||
source_column: str | None = None,
|
source_column: str | None = None,
|
||||||
csv_args: dict | None = None,
|
csv_args: dict[str, Any] | None = None,
|
||||||
):
|
):
|
||||||
"""Initialize with file path."""
|
"""Initialize with file path."""
|
||||||
self._file_path = file_path
|
self._file_path = file_path
|
||||||
|
|||||||
@ -120,7 +120,7 @@ class WaterCrawlProvider:
|
|||||||
}
|
}
|
||||||
|
|
||||||
def _get_results(
|
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]:
|
) -> Generator[WatercrawlDocumentData, None, None]:
|
||||||
page = 0
|
page = 0
|
||||||
page_size = 100
|
page_size = 100
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user