gnomeExtensions: update-extensions.py make var more pythonic

This commit is contained in:
Ryan Horiguchi 2022-04-23 01:34:52 +02:00
parent 7a54239267
commit d13f1f869f
No known key found for this signature in database
GPG Key ID: CA7EE98D45A1132A

View File

@ -238,13 +238,13 @@ def scrape_extensions_index() -> List[Dict[str, Any]]:
f"https://extensions.gnome.org/extension-query/?n_per_page=25&page={page}"
) as response:
data = json.loads(response.read().decode())["extensions"]
responseLength = len(data)
response_length = len(data)
for extension in data:
extensions.append(extension)
# If our page isn't "full", it must have been the last one
if responseLength < 25:
if response_length < 25:
logging.debug(
f"\tThis page only has {responseLength} entries, so it must be the last one."
)