Fix UP031 errors

reported by ruff 0.8.0 .
This commit is contained in:
Nicola Soranzo
2024-11-24 21:35:23 +00:00
parent 1d99e6ddff
commit 26a4e146e0
28 changed files with 85 additions and 82 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ def display(api_key, url, return_formatted=True):
# All collection members should have a name in the response.
# url is optional
if "url" in i:
print("#%d: %s" % (n + 1, i.pop("url")))
print("#{}: {}".format(n + 1, i.pop("url")))
if "name" in i:
print(f" name: {i.pop('name')}")
try:
@@ -102,7 +102,7 @@ def display(api_key, url, return_formatted=True):
for item in i:
print(item)
print("")
print("%d element(s) in collection" % len(r))
print(f"{len(r)} element(s) in collection")
elif isinstance(r, dict):
# Response is an element as defined in the REST style.
print("Member Information")