From 7bbbefbb39c4fdea4c1c847887c9d0f8bc84836d Mon Sep 17 00:00:00 2001 From: Matt Pye Date: Mon, 1 Jun 2020 23:21:11 +0100 Subject: [PATCH] Use format instead of fstring for python3.5 --- paddle/paddle.py | 10 ++++++++-- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/paddle/paddle.py b/paddle/paddle.py index c1ed0a3..ba0cb86 100644 --- a/paddle/paddle.py +++ b/paddle/paddle.py @@ -15,11 +15,17 @@ def __init__(self, error): self.message = str(error) if isinstance(error, requests.HTTPError): # pragma: no cover - Unsure how to trigger a HTTPError here # NOQA: E501 self.code = int(error.response.status_code) - self.message = f'HTTP error {self.code} - {error.response.content.decode("utf-8")}' # NOQA + self.message = 'HTTP error {0} - {1}'.format( + self.code, + error.response.content.decode('utf-8'), + ) elif isinstance(error, dict): try: self.code = int(error['code']) - self.message = f'Paddle error {error["code"]} - {error["message"]}' # NOQA + self.message = 'Paddle error {0} - {1}'.format( + error['code'], + error['message'], + ) except KeyError: # pragma: no cover - Not sure if this is even possible # NOQA: E501 pass diff --git a/pyproject.toml b/pyproject.toml index c45932e..9ba7a2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "paddle-python" packages = [ {include = "paddle"} ] -version = "0.5.0" +version = "0.5.1" description = "Python wrapper around the Paddle.com API" license = "MIT" authors = ["Matt Pye "]