From d7293e08e1b83328b494bfe973af65a377ae0aea Mon Sep 17 00:00:00 2001 From: Justin Myers Date: Sat, 23 Mar 2024 09:58:31 -0700 Subject: [PATCH] remove upgrade UP032 --- adafruit_portalbase/__init__.py | 2 +- adafruit_portalbase/network.py | 4 +--- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/adafruit_portalbase/__init__.py b/adafruit_portalbase/__init__.py index ea016ed..38b9352 100644 --- a/adafruit_portalbase/__init__.py +++ b/adafruit_portalbase/__init__.py @@ -474,7 +474,7 @@ class PortalBase: string = func(values[value_index]) else: try: - string = "{:,d}".format(int(values[value_index])) + string = f"{int(values[value_index]):,d}" except (TypeError, ValueError): string = values[value_index] # ok it's a string self._fetch_set_text(string, index=i) diff --git a/adafruit_portalbase/network.py b/adafruit_portalbase/network.py index 99f2383..288aa3d 100755 --- a/adafruit_portalbase/network.py +++ b/adafruit_portalbase/network.py @@ -668,9 +668,7 @@ class NetworkBase: print("Couldn't parse json: ", response.text) raise except MemoryError as error: - raise MemoryError( - "{} (data is likely too large)".format(error) - ) from error + raise MemoryError(f"{error} (data is likely too large)") from error if content_type == CONTENT_JSON: values = self.process_json(json_out, json_path) diff --git a/pyproject.toml b/pyproject.toml index 98a9376..731228b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ target-version = "py38" [tool.ruff.lint] select = ["I", "PL", "UP"] -ignore = ["PLR2004", "UP030", "UP032"] +ignore = ["PLR2004", "UP030"] [tool.ruff.format] line-ending = "lf"