lint: reformat python code with black

This commit is contained in:
Iain Learmonth 2024-12-06 18:15:47 +00:00
parent 331beb01b4
commit a406a7974b
88 changed files with 2579 additions and 1608 deletions

View file

@ -10,23 +10,32 @@ bp = Blueprint("eotk", __name__)
_SECTION_TEMPLATE_VARS = {
"section": "eotk",
"help_url": "https://bypass.censorship.guide/user/eotk.html"
"help_url": "https://bypass.censorship.guide/user/eotk.html",
}
@bp.route("/list")
def eotk_list() -> ResponseReturnValue:
instances = Eotk.query.filter(Eotk.destroyed.is_(None)).order_by(desc(Eotk.added)).all()
return render_template("list.html.j2",
title="EOTK Instances",
item="eotk",
items=instances,
**_SECTION_TEMPLATE_VARS)
instances = (
Eotk.query.filter(Eotk.destroyed.is_(None)).order_by(desc(Eotk.added)).all()
)
return render_template(
"list.html.j2",
title="EOTK Instances",
item="eotk",
items=instances,
**_SECTION_TEMPLATE_VARS
)
@bp.route("/conf/<group_id>")
def eotk_conf(group_id: int) -> ResponseReturnValue:
group = Group.query.filter(Group.id == group_id).first()
return Response(render_template("sites.conf.j2",
bypass_token=current_app.config["BYPASS_TOKEN"],
group=group), content_type="text/plain")
return Response(
render_template(
"sites.conf.j2",
bypass_token=current_app.config["BYPASS_TOKEN"],
group=group,
),
content_type="text/plain",
)