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.

chore: remove unused pyrefly ignore comments in dataset.py (#36443)

Nicholas-Xiongd646bcf25795
diff --git a/api/controllers/service_api/dataset/dataset.py b/api/controllers/service_api/dataset/dataset.py
index 8c8acc8d0ae..3e4ea0a0ba7 100644
--- a/api/controllers/service_api/dataset/dataset.py
+++ b/api/controllers/service_api/dataset/dataset.py
@@ -177,14 +177,9 @@ class DatasetListApi(DatasetApiResource):
data = marshal(datasets, dataset_detail_fields)
for item in data:
- if (
- item["indexing_technique"] == IndexTechniqueType.HIGH_QUALITY # pyrefly: ignore[bad-index]
- and item["embedding_model_provider"] # pyrefly: ignore[bad-index]
- ):
- item["embedding_model_provider"] = str( # pyrefly: ignore[unsupported-operation]
- ModelProviderID(item["embedding_model_provider"]) # pyrefly: ignore[bad-index]
- )
- item_model = f"{item['embedding_model']}:{item['embedding_model_provider']}" # pyrefly: ignore[bad-index]
+ if item["indexing_technique"] == IndexTechniqueType.HIGH_QUALITY and item["embedding_model_provider"]:
+ item["embedding_model_provider"] = str(ModelProviderID(item["embedding_model_provider"]))
+ item_model = f"{item['embedding_model']}:{item['embedding_model_provider']}"
if item_model in model_names:
item["embedding_available"] = True # type: ignore
else: