From 7efd7459707def3b41de6a3e91157db41f8a8c65 Mon Sep 17 00:00:00 2001 From: Gabriel Saldanha Date: Fri, 29 Jun 2018 00:49:55 -0300 Subject: [PATCH] :art: Make __init__.py imports simpler - Remove unnecessary comment about signals section - Import jsonify in a single line --- flask/__init__.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/flask/__init__.py b/flask/__init__.py index 1ab13c36..fa1893fd 100644 --- a/flask/__init__.py +++ b/flask/__init__.py @@ -29,20 +29,13 @@ from .ctx import has_request_context, has_app_context, \ after_this_request, copy_current_request_context from .blueprints import Blueprint from .templating import render_template, render_template_string - -# the signals from .signals import signals_available, template_rendered, request_started, \ request_finished, got_request_exception, request_tearing_down, \ appcontext_tearing_down, appcontext_pushed, \ appcontext_popped, message_flashed, before_render_template -# We're not exposing the actual json module but a convenient wrapper around -# it. -from . import json - -# This was the only thing that Flask used to export at one point and it had -# a more generic name. -jsonify = json.jsonify +# Expose a convenient wrapper around python's builtin json module. +from .json import jsonify # backwards compat, goes away in 1.0 from .sessions import SecureCookieSession as Session