Skip to content

Commit

Permalink
explain usage of context_override in api_base
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeirojose committed Sep 4, 2024
1 parent 6a4ca03 commit 872c92f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cow_py/common/api/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ def __init__(self, config: APIConfig):
async def _fetch(self, path, method="GET", **kwargs):
url = self.config.get_base_url() + path

del kwargs["context_override"]
# remove context_override key used by our backoff decorator
clean_kwargs = {k: v for k, v in kwargs.items() if k != "context_override"}

async with httpx.AsyncClient() as client:
builder = RequestBuilder(
RequestStrategy(),
JsonResponseAdapter(),
)
return await builder.execute(client, url, method, **kwargs)
return await builder.execute(client, url, method, **clean_kwargs)

0 comments on commit 872c92f

Please sign in to comment.