Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 17, 2023
1 parent da42e99 commit 432392d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sqlalchemy_file/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def process_bind_param(
raise ValueError(f"Expected {self.upload_type}, received: {type(value)}")
if self.multiple and not (
isinstance(value, list)
and all([isinstance(v, self.upload_type) for v in value])
and all(isinstance(v, self.upload_type) for v in value)
): # pragma: no cover
raise ValueError(
f"Expected MutableList[{self.upload_type}], received: {type(value)}"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_multiple_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_create_multiple_content_rollback(self, fake_file, fake_content) -> None
)
).scalar_one()
paths = [p["path"] for p in attachment.multiple_content]
assert all([StorageManager.get_file(path) is not None for path in paths])
assert all(StorageManager.get_file(path) is not None for path in paths)
session.rollback()
for path in paths:
with pytest.raises(ObjectDoesNotExistError):
Expand Down

0 comments on commit 432392d

Please sign in to comment.