Skip to content

Commit

Permalink
CI: Move workflows to the correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwafemi Adenuga committed Jun 4, 2024
2 parents 0883c7a + 2e0b3f9 commit 2424c90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions elorus/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def handle_file_download(self, response):
filename = filename_kv[1]
return filename, response.content

def _handle_response(self, response):
def _handle_response(self, response: httpx.Response):
if response.headers.get("Content-Type", "").lower() == "application/pdf":
return self.handle_file_download(response)

Expand Down Expand Up @@ -108,16 +108,16 @@ def _handle_response(self, response):

def _handle_request(
self, method: str, path: str, payload: Optional[dict] = None, **kwargs
):
) -> httpx.Response:
auth = self._get_auth()
url = f"{self.base_url}/{self.api_version}/{path}"
with httpx.Client(auth=auth) as client:
response = client.request(method, url, json=payload, **kwargs)
return self._handle_response(response)


class SubClient:
client = Client
class SubClient(Client):
client: Client

def __init__(self, client: Client):
self.client = client
Expand Down

0 comments on commit 2424c90

Please sign in to comment.