Skip to content

Commit c6cb6bf

Browse files
committed
Revert "fix(logs): guard AsyncRequest with clear ImportError when async extras missing"
This reverts commit f595e11.
1 parent f595e11 commit c6cb6bf

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

resend/logs/_logs.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
try:
1212
from resend.async_request import AsyncRequest
1313
except ImportError:
14-
AsyncRequest = None # type: ignore[assignment]
14+
pass
1515

1616

1717
class Logs:
@@ -163,11 +163,6 @@ async def get_async(cls, log_id: str) -> GetResponse:
163163
Returns:
164164
GetResponse: The log object
165165
"""
166-
if AsyncRequest is None:
167-
raise ImportError(
168-
"Async support requires additional dependencies. "
169-
"Install them with: pip install resend[async]"
170-
)
171166
path = f"/logs/{log_id}"
172167
resp = await AsyncRequest[Logs.GetResponse](
173168
path=path, params={}, verb="get"
@@ -189,11 +184,6 @@ async def list_async(cls, params: Optional[ListParams] = None) -> ListResponse:
189184
Returns:
190185
ListResponse: A list of log objects
191186
"""
192-
if AsyncRequest is None:
193-
raise ImportError(
194-
"Async support requires additional dependencies. "
195-
"Install them with: pip install resend[async]"
196-
)
197187
base_path = "/logs"
198188
query_params = cast(Dict[Any, Any], params) if params else None
199189
path = PaginationHelper.build_paginated_path(base_path, query_params)

0 commit comments

Comments
 (0)