From 94de1326f241150de0aa2a2bf40a613f52219227 Mon Sep 17 00:00:00 2001 From: lebedevhh Date: Mon, 15 Aug 2022 14:07:31 -0400 Subject: [PATCH] made some minor changes in blueprints.py --- src/flask/blueprints.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/flask/blueprints.py b/src/flask/blueprints.py index 104f8acf..bb247ceb 100644 --- a/src/flask/blueprints.py +++ b/src/flask/blueprints.py @@ -191,8 +191,8 @@ class Blueprint(Scaffold): import warnings warnings.warn( - "'bp.json_encoder' is deprecated and will be removed in Flask 2.3." - " Customize 'app.json_provider_class' or 'app.json' instead.", + """'bp.json_encoder' is deprecated and will be removed in Flask 2.3. + Customize 'app.json_provider_class' or 'app.json' instead.""", DeprecationWarning, stacklevel=2, ) @@ -203,8 +203,8 @@ class Blueprint(Scaffold): import warnings warnings.warn( - "'bp.json_encoder' is deprecated and will be removed in Flask 2.3." - " Customize 'app.json_provider_class' or 'app.json' instead.", + """'bp.json_encoder' is deprecated and will be removed in Flask 2.3. + Customize 'app.json_provider_class' or 'app.json' instead.'""", DeprecationWarning, stacklevel=2, ) @@ -225,8 +225,8 @@ class Blueprint(Scaffold): import warnings warnings.warn( - "'bp.json_decoder' is deprecated and will be removed in Flask 2.3." - " Customize 'app.json_provider_class' or 'app.json' instead.", + """'bp.json_decoder' is deprecated and will be removed in Flask 2.3. + Customize 'app.json_provider_class' or 'app.json' instead.""", DeprecationWarning, stacklevel=2, ) @@ -237,8 +237,8 @@ class Blueprint(Scaffold): import warnings warnings.warn( - "'bp.json_decoder' is deprecated and will be removed in Flask 2.3." - " Customize 'app.json_provider_class' or 'app.json' instead.", + """'bp.json_decoder' is deprecated and will be removed in Flask 2.3. + Customize 'app.json_provider_class' or 'app.json' instead.""", DeprecationWarning, stacklevel=2, ) @@ -285,14 +285,14 @@ class Blueprint(Scaffold): import warnings warnings.warn( - f"The setup method '{f_name}' can no longer be called on" - f" the blueprint '{self.name}'. It has already been" - " registered at least once, any changes will not be" - " applied consistently.\n" - "Make sure all imports, decorators, functions, etc." - " needed to set up the blueprint are done before" - " registering it.\n" - "This warning will become an exception in Flask 2.3.", + f"""The setup method '{f_name}' can no longer be called on + the blueprint '{self.name}'. It has already been + registered at least once, any changes will not be + applied consistently.\n + Make sure all imports, decorators, functions, etc. + needed to set up the blueprint are done before + registering it.\n + This warning will become an exception in Flask 2.3.""", UserWarning, stacklevel=3, ) @@ -631,9 +631,9 @@ class Blueprint(Scaffold): import warnings warnings.warn( - "'before_app_first_request' is deprecated and will be" - " removed in Flask 2.3. Use 'record_once' instead to run" - " setup code when registering the blueprint.", + """'before_app_first_request' is deprecated and will be + removed in Flask 2.3. Use 'record_once' instead to run + setup code when registering the blueprint.""", DeprecationWarning, stacklevel=2, )