ci: add flake8
This commit is contained in:
parent
014596d271
commit
dd501a6e4e
32 changed files with 170 additions and 171 deletions
|
@ -31,7 +31,7 @@ def list_format_name(s: str) -> str:
|
|||
|
||||
@bp.route('/list')
|
||||
def list_list() -> ResponseReturnValue:
|
||||
lists = MirrorList.query.filter(MirrorList.destroyed == None).all()
|
||||
lists = MirrorList.query.filter(MirrorList.destroyed.is_(None)).all()
|
||||
return render_template("list.html.j2",
|
||||
section="list",
|
||||
title="Mirror Lists",
|
||||
|
@ -62,11 +62,11 @@ def list_preview(format_: str) -> ResponseReturnValue:
|
|||
|
||||
@bp.route("/destroy/<list_id>", methods=['GET', 'POST'])
|
||||
def list_destroy(list_id: int) -> ResponseReturnValue:
|
||||
list_ = MirrorList.query.filter(MirrorList.id == list_id, MirrorList.destroyed == None).first()
|
||||
list_ = MirrorList.query.filter(MirrorList.id == list_id, MirrorList.destroyed.is_(None)).first()
|
||||
if list_ is None:
|
||||
return response_404("The requested bridge configuration could not be found.")
|
||||
return view_lifecycle(
|
||||
header=f"Destroy mirror list?",
|
||||
header="Destroy mirror list?",
|
||||
message=list_.description,
|
||||
success_view="portal.list.list_list",
|
||||
success_message="This list will no longer be updated and may be deleted depending on the provider.",
|
||||
|
@ -96,7 +96,7 @@ def list_new(group_id: Optional[int] = None) -> ResponseReturnValue:
|
|||
try:
|
||||
db.session.add(list_)
|
||||
db.session.commit()
|
||||
flash(f"Created new mirror list.", "success")
|
||||
flash("Created new mirror list.", "success")
|
||||
return redirect(url_for("portal.list.list_list"))
|
||||
except exc.SQLAlchemyError as e:
|
||||
print(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue