chore: bump mypy to 1.16 (#20608)

This commit is contained in:
Bowen Liang 2025-06-11 01:01:33 +08:00 • committed by GitHub
commit 0f3d4d0b6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 2217 additions and 2178 deletions

View file

@ -139,4 +139,4 @@ class CacheEmbedding(Embeddings):
logging.exception(f"Failed to add embedding to redis for the text '{text[:10]}...({len(text)} chars)'")
raise ex
return embedding_results
return embedding_results # type: ignore

View file

@ -104,7 +104,7 @@ class QAIndexProcessor(BaseIndexProcessor):
def format_by_template(self, file: FileStorage, **kwargs) -> list[Document]:
# check file type
if not file.filename.endswith(".csv"):
if not file.filename or not file.filename.endswith(".csv"):
raise ValueError("Invalid file type. Only CSV files are allowed")
try: