aboutsummaryrefslogtreecommitdiff
path: root/app/views/error_pages.py
diff options
context:
space:
mode:
authordeepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>2021-06-06 10:11:00 +0000
committerGitHub <noreply@github.com>2021-06-06 10:11:00 +0000
commit6595d53212eaa4b9319da7196f5e2286d30eb462 (patch)
tree6fb829110658369321bab897707132f76f9b1b2c /app/views/error_pages.py
parent57207efe38174666d40964b74856537c6f5314ab (diff)
Format code with black
This commit fixes the style issues introduced in 57207ef according to the output from black. Details: https://deepsource.io/gh/navanchauhan/SaaS-in-a-Flask/transform/fb582430-1f1f-45bb-8c05-5f5bec16f981/
Diffstat (limited to 'app/views/error_pages.py')
-rw-r--r--app/views/error_pages.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/app/views/error_pages.py b/app/views/error_pages.py
index 5d995fc..1f066cc 100644
--- a/app/views/error_pages.py
+++ b/app/views/error_pages.py
@@ -1,18 +1,35 @@
from app import app
from flask import render_template
+
@app.route("/Simulate500")
def simulate_500():
- return 500
+ return 500
+
@app.errorhandler(403)
def page_forbidden(e):
- return render_template("message.html",code=403,message="Forbidden. You shall not pass"), 403
+ return (
+ render_template(
+ "message.html", code=403, message="Forbidden. You shall not pass"
+ ),
+ 403,
+ )
+
@app.errorhandler(404)
def page_not_found(e):
- return render_template('message.html',code=404,message="Whoops! Page Not Found"), 404
+ return (
+ render_template("message.html", code=404, message="Whoops! Page Not Found"),
+ 404,
+ )
+
@app.errorhandler(500)
def page_server_error(e):
- return render_template("message.html",code=500,message="Server Could Not Process This."), 500 \ No newline at end of file
+ return (
+ render_template(
+ "message.html", code=500, message="Server Could Not Process This."
+ ),
+ 500,
+ )