🎨 Format Python code with Black

This commit is contained in:
ericgaspar
2024-03-10 12:17:36 +00:00
committed by github-actions[bot]
parent 318a1f6a93
commit 1e969d51a9
17 changed files with 740 additions and 275 deletions

View File

@ -93,6 +93,7 @@ def get_stars():
get_stars.cache_checksum = None
get_stars()
def check_wishlist_submit_ratelimit(user):
dir_ = os.path.join(".wishlist_ratelimit")
@ -101,7 +102,10 @@ def check_wishlist_submit_ratelimit(user):
f = os.path.join(dir_, md5(user.encode()).hexdigest())
return not os.path.exists(f) or (time.time() - os.path.getmtime(f)) > (15 * 24 * 3600) # 15 days
return not os.path.exists(f) or (time.time() - os.path.getmtime(f)) > (
15 * 24 * 3600
) # 15 days
def save_wishlist_submit_for_ratelimit(user):
@ -178,9 +182,9 @@ def get_app_md_and_screenshots(app_folder, infos):
if entry.is_file() and ext in ("png", "jpg", "jpeg", "webp", "gif"):
with open(entry.path, "rb") as img_file:
data = base64.b64encode(img_file.read()).decode("utf-8")
infos[
"screenshot"
] = f"data:image/{ext};charset=utf-8;base64,{data}"
infos["screenshot"] = (
f"data:image/{ext};charset=utf-8;base64,{data}"
)
break
ram_build_requirement = infos["manifest"]["integration"]["ram"]["build"]