Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove upgrade UP032
  • Loading branch information
justmobilize committed Mar 23, 2024
commit d7293e08e1b83328b494bfe973af65a377ae0aea
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