You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

datasource_file_parser.py 518B

6 months ago
123456789101112131415
  1. from typing import TYPE_CHECKING, Any, cast
  2. from core.datasource import datasource_file_manager
  3. from core.datasource.datasource_file_manager import DatasourceFileManager
  4. if TYPE_CHECKING:
  5. from core.datasource.datasource_file_manager import DatasourceFileManager
  6. tool_file_manager: dict[str, Any] = {"manager": None}
  7. class DatasourceFileParser:
  8. @staticmethod
  9. def get_datasource_file_manager() -> "DatasourceFileManager":
  10. return cast("DatasourceFileManager", datasource_file_manager["manager"])