From e6ba8015ee7ac891c66241026c26eb72b2786ba6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Jun 2022 07:36:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_apps/blueprintapp/apps/frontend/__init__.py | 5 +++-- tests/test_apps/helloworld/hello.py | 2 +- tests/typing/typing_route.py | 8 +++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/test_apps/blueprintapp/apps/frontend/__init__.py b/tests/test_apps/blueprintapp/apps/frontend/__init__.py index 14cf4631..e8bb8566 100644 --- a/tests/test_apps/blueprintapp/apps/frontend/__init__.py +++ b/tests/test_apps/blueprintapp/apps/frontend/__init__.py @@ -3,12 +3,13 @@ from flask import render_template frontend = Blueprint("frontend", __name__, template_folder="templates") -#Returns "index.html" from the frontend folder when "/" accessed by the user +# Returns "index.html" from the frontend folder when "/" accessed by the user @frontend.route("/") def index(): return render_template("frontend/index.html") -#Returns "missing_template.html" when "/missing" is accessed by the user + +# Returns "missing_template.html" when "/missing" is accessed by the user @frontend.route("/missing") def missing_template(): return render_template("missing_template.html") diff --git a/tests/test_apps/helloworld/hello.py b/tests/test_apps/helloworld/hello.py index df55b9a0..4d00e3df 100644 --- a/tests/test_apps/helloworld/hello.py +++ b/tests/test_apps/helloworld/hello.py @@ -2,7 +2,7 @@ from flask import Flask app = Flask(__name__) -#Returns "Hello World!" when "/" is accessed by the user +# Returns "Hello World!" when "/" is accessed by the user @app.route("/") def hello(): return "Hello World!" diff --git a/tests/typing/typing_route.py b/tests/typing/typing_route.py index 5a677bc0..7638ea0d 100644 --- a/tests/typing/typing_route.py +++ b/tests/typing/typing_route.py @@ -25,7 +25,8 @@ def hello_bytes() -> bytes: def hello_json() -> Response: return jsonify({"response": "Hello, World!"}) -#Returns hello with the current status code when "/status" is accessed or "/status" is accessed with the parameter "code" + +# Returns hello with the current status code when "/status" is accessed or "/status" is accessed with the parameter "code" @app.route("/status") @app.route("/status/") def tuple_status(code: int = 200) -> tuple[str, int]: @@ -41,8 +42,9 @@ def tuple_status_enum() -> tuple[str, int]: def tuple_headers() -> tuple[str, dict[str, str]]: return "Hello, World!", {"Content-Type": "text/plain"} -#Returns "index.html" when "/template" or "/template" with parameter "name" included is accessed by the user -#"name" is passed as an argument for the html document when rendering it only if it was specified in the url + +# Returns "index.html" when "/template" or "/template" with parameter "name" included is accessed by the user +# "name" is passed as an argument for the html document when rendering it only if it was specified in the url @app.route("/template") @app.route("/template/") def return_template(name: str | None = None) -> str: