Skip to content

Commit 637bf4e

Browse files
fix: Types to use Option[T] (#152)
1 parent 5ea857b commit 637bf4e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

supabase_functions/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Literal, Union, overload
3+
from typing import Literal, Optional, Union, overload
44

55
from ._async.functions_client import AsyncFunctionsClient
66
from ._sync.functions_client import SyncFunctionsClient

supabase_functions/_async/functions_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def _request(
3535
self,
3636
method: Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"],
3737
url: str,
38-
headers: Union[Dict[str, str], None] = None,
38+
headers: Optional[Dict[str, str]] = None,
3939
json: Optional[Dict[Any, Any]] = None,
4040
) -> Response:
4141
response = await self._client.request(method, url, json=json, headers=headers)

supabase_functions/_sync/functions_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _request(
3535
self,
3636
method: Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"],
3737
url: str,
38-
headers: Union[Dict[str, str], None] = None,
38+
headers: Optional[Dict[str, str]] = None,
3939
json: Optional[Dict[Any, Any]] = None,
4040
) -> Response:
4141
response = self._client.request(method, url, json=json, headers=headers)

0 commit comments

Comments
 (0)