Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Dec 7, 2023
1 parent f5e2cad commit 9ba2e21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion snakemake_storage_plugin_gcs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ def exists(self) -> bool:
"""
Return true if the object exists.
"""
return self.bucket.exists() and self.blob.exists() or any(self.directory_entries())
return (
self.bucket.exists() and self.blob.exists() or any(self.directory_entries())
)

@retry.Retry(predicate=google_cloud_retry_predicate)
def mtime(self) -> float:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fake_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
client.create_bucket(bucket)
bucket.blob("test-file.txt").upload_from_string("Hello World!")

assert not bucket.blob("foo").exists()
assert not bucket.blob("foo").exists()
2 changes: 1 addition & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def test_storage_not_existing_dbg(self, tmp_path):
obj = self._get_obj(tmp_path, self.get_query_not_existing(tmp_path))
assert not obj.blob.exists()
print(obj.directory_entries(), file=sys.stderr)
print(any(obj.directory_entries()), file=sys.stderr)
print(any(obj.directory_entries()), file=sys.stderr)

0 comments on commit 9ba2e21

Please sign in to comment.