mistercrunch commented on a change in pull request #8418: Flask App factory PR #1 URL: https://github.com/apache/incubator-superset/pull/8418#discussion_r337841443
########## File path: superset/__init__.py ########## @@ -14,231 +14,37 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# pylint: disable=C,R,W """Package's main module!""" -import json -import logging -import os -from copy import deepcopy -from typing import Any, Dict +from flask import current_app as flask_current_app +from werkzeug.local import LocalProxy -import wtforms_json -from flask import Flask, redirect -from flask_appbuilder import AppBuilder, IndexView, SQLA -from flask_appbuilder.baseviews import expose -from flask_compress import Compress -from flask_migrate import Migrate -from flask_talisman import Talisman -from flask_wtf.csrf import CSRFProtect - -from superset import config +from superset.app import create_app from superset.connectors.connector_registry import ConnectorRegistry +from superset.extensions import ( Review comment: NIT: I'm not big on aliasing everything here, I'd prefer just going `from superset import extensions` or `from superset import extensions as exts` if we need a smaller handle, then reference that later on in the module. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
