From a6d90967c1357591b9941eacc75f8875928f4809 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 22 Dec 2023 21:05:17 -0500 Subject: [PATCH] fix: pylint fixes --- pyzipline/rest_adapter.py | 3 +-- pyzipline/zipline.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pyzipline/rest_adapter.py b/pyzipline/rest_adapter.py index 143a3a6..04876ec 100644 --- a/pyzipline/rest_adapter.py +++ b/pyzipline/rest_adapter.py @@ -68,8 +68,7 @@ class RestAdapter: if response.headers.get('Content-Type') == 'application/octet-stream': # If the response contains a valid file, return success Result with file content return Result(success=True, status_code=response.status_code, message=response.reason, data=response.content) - else: - raise PyZiplineError("Could not decode response from Zipline server") from e + raise PyZiplineError("Could not decode response from Zipline server") from e # If status_code in 200-299 range, return success Result with data, otherwise return failed Result with message is_success = 299 >= response.status_code >= 200 diff --git a/pyzipline/zipline.py b/pyzipline/zipline.py index 58099a9..1834dc8 100644 --- a/pyzipline/zipline.py +++ b/pyzipline/zipline.py @@ -272,7 +272,7 @@ class ZiplineApi: Returns: bytes: The file, in bytes """ - result: Result = self._rest_adapter.get(endpoint=f"auth/image", params={'id': file_id, 'password': password}) + result: Result = self._rest_adapter.get(endpoint="auth/image", params={'id': file_id, 'password': password}) if result.status_code == 200: return result.data if result.message == 'image not found':