From 1d57801c0c9bdd3af18e11dbeb715ade09a7d2da Mon Sep 17 00:00:00 2001 From: Stephen Hu <812791840@qq.com> Date: Mon, 27 Oct 2025 09:29:39 +0800 Subject: [PATCH] Fix:ERROR 20 Method rag.nlp.search.Dealer.search() parameter highlight="None" violates type hint bool | list, as "None" not list or bool. (#10743) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/10733 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/search.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rag/nlp/search.py b/rag/nlp/search.py index c10b803bd..4256a638d 100644 --- a/rag/nlp/search.py +++ b/rag/nlp/search.py @@ -72,9 +72,12 @@ class Dealer: def search(self, req, idx_names: str | list[str], kb_ids: list[str], emb_mdl=None, - highlight: bool | list = False, + highlight: bool | list | None = None, rank_feature: dict | None = None ): + if highlight is None: + highlight = False + filters = self.get_filters(req) orderBy = OrderByExpr()