Skip to content

Commit

Permalink
remove upgrade UP032
Browse files Browse the repository at this point in the history
  • Loading branch information
justmobilize committed Mar 23, 2024
1 parent b038cc7 commit d7293e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adafruit_portalbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def _fill_text_labels(self, values):
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)
Expand Down
4 changes: 1 addition & 3 deletions adafruit_portalbase/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,7 @@ def _parse_data(
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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d7293e0

Please sign in to comment.