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:
parent
45970d478f
commit
23e0296495
2 changed files with 18 additions and 9 deletions
26
store/app.py
26
store/app.py
|
@ -455,11 +455,7 @@ Description: {description}
|
||||||
|
|
||||||
@app.route("/dash")
|
@app.route("/dash")
|
||||||
def dash():
|
def dash():
|
||||||
return render_template(
|
return render_template("dash.html", data=get_dashboard_data(), stars=get_stars())
|
||||||
"dash.html",
|
|
||||||
data=get_dashboard_data(),
|
|
||||||
stars=get_stars()
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/charts")
|
@app.route("/charts")
|
||||||
|
@ -467,15 +463,27 @@ def charts():
|
||||||
|
|
||||||
dashboard_data = get_dashboard_data()
|
dashboard_data = get_dashboard_data()
|
||||||
level_summary = {}
|
level_summary = {}
|
||||||
for i in range(0,9):
|
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[i] = len(
|
||||||
level_summary["unknown"] = len([infos for infos in dashboard_data.values() if infos.get("ci_results", {}).get("main").get("level") in [None, "?"]])
|
[
|
||||||
|
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(
|
return render_template(
|
||||||
"charts.html",
|
"charts.html",
|
||||||
level_summary=level_summary,
|
level_summary=level_summary,
|
||||||
history=json.loads(open(".cache/history.json").read()),
|
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()),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import requests
|
||||||
import json
|
import json
|
||||||
import toml
|
import toml
|
||||||
from github import Github
|
from github import Github
|
||||||
|
|
||||||
sys.path = [os.path.dirname(__file__)] + sys.path
|
sys.path = [os.path.dirname(__file__)] + sys.path
|
||||||
from utils import get_catalog
|
from utils import get_catalog
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue