mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
chore: add ast-grep rule to convert Optional[T] to T | None (#25560)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import math
|
||||
from collections import Counter
|
||||
from typing import Optional
|
||||
|
||||
import numpy as np
|
||||
|
||||
@ -22,9 +21,9 @@ class WeightRerankRunner(BaseRerankRunner):
|
||||
self,
|
||||
query: str,
|
||||
documents: list[Document],
|
||||
score_threshold: Optional[float] = None,
|
||||
top_n: Optional[int] = None,
|
||||
user: Optional[str] = None,
|
||||
score_threshold: float | None = None,
|
||||
top_n: int | None = None,
|
||||
user: str | None = None,
|
||||
) -> list[Document]:
|
||||
"""
|
||||
Run rerank model
|
||||
|
||||
Reference in New Issue
Block a user