Skip to content

Commit 1883149

Browse files
author
Joel Lee
committed
fix: ensure python37 compat
1 parent 71fae8b commit 1883149

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: supabase/lib/storage/storage_bucket_api.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
from collections.abc import Awaitable
44
from dataclasses import dataclass
55
from datetime import datetime
6-
from typing import Any, Literal, Optional, Type, Union
6+
from typing import Any, Dict, List, Optional, Type, Union
77

88
from httpx import AsyncClient, Client, HTTPError
99

1010
__all__ = ["Bucket", "StorageBucketAPI"]
1111

12-
_RequestMethod = Literal["GET", "POST", "PUT", "DELETE", "PATCH"]
12+
_RequestMethod = str
1313

1414

1515
class StorageException(Exception):
@@ -33,10 +33,10 @@ def __post_init__(self) -> None:
3333

3434

3535
ResponseType = Union[
36-
dict[
36+
Dict[
3737
str, str
3838
], # response from an endpoint without a custom response_class, example: create_bucket
39-
list[
39+
List[
4040
Bucket
4141
], # response from an endpoint which returns a list of objects, example: list_buckets
4242
Bucket, # response from an endpoint which returns a single object, example: get_bucket
@@ -80,7 +80,7 @@ def _sync_request(
8080
response_class: Optional[Type] = None,
8181
) -> ResponseType:
8282
if isinstance(self._client, AsyncClient): # only to appease the type checker
83-
return
83+
return None
8484

8585
response = self._client.request(method, url, json=json)
8686
try:

0 commit comments

Comments
 (0)