Skip to content

Commit 7392efd

Browse files
author
Sourcery AI
committed
'Refactored by Sourcery'
1 parent ffdce41 commit 7392efd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

supabase/lib/storage/storage_file_api.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ def get_public_url(self, path: str):
7474
"""
7575
try:
7676
_path = self._get_final_path(path)
77-
public_url = f"{self.url}/object/public/{_path}"
78-
return public_url
77+
return f"{self.url}/object/public/{_path}"
7978
except:
8079
print("Public URL not found")
8180

@@ -143,7 +142,7 @@ def list(self, path: str = None, options: dict = {}):
143142
try:
144143
body = dict(self.DEFAULT_SEARCH_OPTIONS, **options)
145144
headers = dict(self.headers, **{"Content-Type": "application/json"})
146-
body["prefix"] = path if path else ""
145+
body["prefix"] = path or ""
147146
getdata = httpx.post(
148147
f"{self.url}/object/list/{self.bucket_id}",
149148
json=body,

0 commit comments

Comments
 (0)