lint: reformat python code with black
This commit is contained in:
parent
331beb01b4
commit
a406a7974b
88 changed files with 2579 additions and 1608 deletions
|
@ -9,13 +9,13 @@ from app.portal.util import response_404, view_lifecycle
|
|||
bp = Blueprint("onion", __name__)
|
||||
|
||||
|
||||
@bp.route("/new", methods=['GET', 'POST'])
|
||||
@bp.route("/new/<group_id>", methods=['GET', 'POST'])
|
||||
@bp.route("/new", methods=["GET", "POST"])
|
||||
@bp.route("/new/<group_id>", methods=["GET", "POST"])
|
||||
def onion_new(group_id: Optional[int] = None) -> ResponseReturnValue:
|
||||
return redirect("/ui/web/onions/new")
|
||||
|
||||
|
||||
@bp.route('/edit/<onion_id>', methods=['GET', 'POST'])
|
||||
@bp.route("/edit/<onion_id>", methods=["GET", "POST"])
|
||||
def onion_edit(onion_id: int) -> ResponseReturnValue:
|
||||
return redirect("/ui/web/onions/edit/{}".format(onion_id))
|
||||
|
||||
|
@ -25,9 +25,11 @@ def onion_list() -> ResponseReturnValue:
|
|||
return redirect("/ui/web/onions")
|
||||
|
||||
|
||||
@bp.route("/destroy/<onion_id>", methods=['GET', 'POST'])
|
||||
@bp.route("/destroy/<onion_id>", methods=["GET", "POST"])
|
||||
def onion_destroy(onion_id: str) -> ResponseReturnValue:
|
||||
onion = Onion.query.filter(Onion.id == int(onion_id), Onion.destroyed.is_(None)).first()
|
||||
onion = Onion.query.filter(
|
||||
Onion.id == int(onion_id), Onion.destroyed.is_(None)
|
||||
).first()
|
||||
if onion is None:
|
||||
return response_404("The requested onion service could not be found.")
|
||||
return view_lifecycle(
|
||||
|
@ -37,5 +39,5 @@ def onion_destroy(onion_id: str) -> ResponseReturnValue:
|
|||
success_view="portal.onion.onion_list",
|
||||
section="onion",
|
||||
resource=onion,
|
||||
action="destroy"
|
||||
action="destroy",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue