Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

fix: Types to use Option[T] #152

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion supabase_functions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Literal, Union, overload
from typing import Literal, Optional, Union, overload

from ._async.functions_client import AsyncFunctionsClient
from ._sync.functions_client import SyncFunctionsClient
Expand Down
2 changes: 1 addition & 1 deletion supabase_functions/_async/functions_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def _request(
self,
method: Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"],
url: str,
headers: Union[Dict[str, str], None] = None,
headers: Optional[Dict[str, str]] = None,
json: Optional[Dict[Any, Any]] = None,
) -> Response:
response = await self._client.request(method, url, json=json, headers=headers)
Expand Down
2 changes: 1 addition & 1 deletion supabase_functions/_sync/functions_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _request(
self,
method: Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"],
url: str,
headers: Union[Dict[str, str], None] = None,
headers: Optional[Dict[str, str]] = None,
json: Optional[Dict[Any, Any]] = None,
) -> Response:
response = self._client.request(method, url, json=json, headers=headers)
Expand Down