lots of typing fixes
This commit is contained in:
parent
51f580a304
commit
3665c34961
43 changed files with 260 additions and 178 deletions
|
@ -1,4 +1,5 @@
|
|||
from flask import render_template, Response, flash, redirect, url_for, Blueprint
|
||||
from flask.typing import ResponseReturnValue
|
||||
from sqlalchemy import desc
|
||||
|
||||
from app.extensions import db
|
||||
|
@ -9,7 +10,7 @@ bp = Blueprint("proxy", __name__)
|
|||
|
||||
|
||||
@bp.route("/list")
|
||||
def proxy_list():
|
||||
def proxy_list() -> ResponseReturnValue:
|
||||
proxies = Proxy.query.filter(Proxy.destroyed == None).order_by(desc(Proxy.added)).all()
|
||||
return render_template("list.html.j2",
|
||||
section="proxy",
|
||||
|
@ -19,7 +20,7 @@ def proxy_list():
|
|||
|
||||
|
||||
@bp.route("/block/<proxy_id>", methods=['GET', 'POST'])
|
||||
def proxy_block(proxy_id):
|
||||
def proxy_block(proxy_id: int) -> ResponseReturnValue:
|
||||
proxy = Proxy.query.filter(Proxy.id == proxy_id, Proxy.destroyed == None).first()
|
||||
if proxy is None:
|
||||
return Response(render_template("error.html.j2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue