修了一点pyright错误喵~

This commit is contained in:
ikun-11451
2025-11-29 19:17:40 +08:00
parent 06637891b4
commit c13bac894b
2 changed files with 5 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ from src.common.logger import get_logger
egg = get_logger("小彩蛋")
def weighted_choice(data: Sequence[str], weights: list[float] | None = None) -> str:
def weighted_choice(data: Sequence[str], weights: Sequence[float] | None = None) -> str:
"""
从 data 中按权重随机返回一条。
若 weights 为 None则所有元素权重默认为 1。