Skip to content

Commit

Permalink
chore(internal): update resource client type (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and RobertCraigie committed Jan 23, 2024
1 parent f2c0945 commit e1d0063
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/anthropic/_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@

import time
import asyncio
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._client import Anthropic, AsyncAnthropic
from ._base_client import SyncAPIClient, AsyncAPIClient


class SyncAPIResource:
_client: Anthropic
_client: SyncAPIClient

def __init__(self, client: Anthropic) -> None:
def __init__(self, client: SyncAPIClient) -> None:
self._client = client
self._get = client.get
self._post = client.post
Expand All @@ -27,9 +25,9 @@ def _sleep(self, seconds: float) -> None:


class AsyncAPIResource:
_client: AsyncAnthropic
_client: AsyncAPIClient

def __init__(self, client: AsyncAnthropic) -> None:
def __init__(self, client: AsyncAPIClient) -> None:
self._client = client
self._get = client.get
self._post = client.post
Expand Down

0 comments on commit e1d0063

Please sign in to comment.