Skip to content

Commit 1d57801

Browse files
authored
Fix:ERROR 20 Method rag.nlp.search.Dealer.search() parameter highlight="None" violates type hint bool | list, as <class "builtins.NoneType"> "None" not list or bool. (#10743)
### What problem does this PR solve? #10733 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
1 parent 73144e2 commit 1d57801

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rag/nlp/search.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ def get_filters(self, req):
7272
def search(self, req, idx_names: str | list[str],
7373
kb_ids: list[str],
7474
emb_mdl=None,
75-
highlight: bool | list = False,
75+
highlight: bool | list | None = None,
7676
rank_feature: dict | None = None
7777
):
78+
if highlight is None:
79+
highlight = False
80+
7881
filters = self.get_filters(req)
7982
orderBy = OrderByExpr()
8083

0 commit comments

Comments
 (0)