Skip to content

Commit

Permalink
Assert equal lengths instead of using zip(..., strict=True)
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Feb 4, 2025
1 parent 83e7607 commit 3a2d98e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/deploy/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
def upload_documents(*, client, document_paths, mime_types=None):
if mime_types is None:
mime_types = [None for _ in document_paths]
else:
assert len(mime_types) == len(document_paths)
documents = (
client.post(
"/api/documents",
Expand All @@ -12,11 +14,7 @@ def upload_documents(*, client, document_paths, mime_types=None):
"name": document_path.name,
"mime_type": mime_type,
}
for document_path, mime_type in zip(
document_paths,
mime_types,
strict=True,
)
for document_path, mime_type in zip(document_paths, mime_types)
],
)
.raise_for_status()
Expand Down

0 comments on commit 3a2d98e

Please sign in to comment.