diff --git a/supabase_functions/__init__.py b/supabase_functions/__init__.py index 5c99910..9bb74e6 100644 --- a/supabase_functions/__init__.py +++ b/supabase_functions/__init__.py @@ -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 diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index 9705774..4a037f9 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -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) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index 372d864..3550219 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -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)