1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

Format Python code with Black (#2316)

Co-authored-by: alexAubin <4533074+alexAubin@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-05-09 23:25:47 +02:00 committed by GitHub
parent 45970d478f
commit 23e0296495
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 9 deletions

View file

@ -455,11 +455,7 @@ Description: {description}
@app.route("/dash")
def dash():
return render_template(
"dash.html",
data=get_dashboard_data(),
stars=get_stars()
)
return render_template("dash.html", data=get_dashboard_data(), stars=get_stars())
@app.route("/charts")
@ -467,15 +463,27 @@ def charts():
dashboard_data = get_dashboard_data()
level_summary = {}
for i in range(0,9):
level_summary[i] = len([infos for infos in dashboard_data.values() if infos.get("ci_results", {}).get("main").get("level") == i])
level_summary["unknown"] = len([infos for infos in dashboard_data.values() if infos.get("ci_results", {}).get("main").get("level") in [None, "?"]])
for i in range(0, 9):
level_summary[i] = len(
[
infos
for infos in dashboard_data.values()
if infos.get("ci_results", {}).get("main").get("level") == i
]
)
level_summary["unknown"] = len(
[
infos
for infos in dashboard_data.values()
if infos.get("ci_results", {}).get("main").get("level") in [None, "?"]
]
)
return render_template(
"charts.html",
level_summary=level_summary,
history=json.loads(open(".cache/history.json").read()),
news_per_date=json.loads(open(".cache/news.json").read())
news_per_date=json.loads(open(".cache/news.json").read()),
)

View file

@ -4,6 +4,7 @@ import requests
import json
import toml
from github import Github
sys.path = [os.path.dirname(__file__)] + sys.path
from utils import get_catalog