This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new e112e44  [flake8] Adding future-import check (#4476)
e112e44 is described below

commit e112e4417cb7386fe161c5ff2fe0f1b5d05c3a17
Author: John Bodley <4567245+john-bod...@users.noreply.github.com>
AuthorDate: Fri Feb 23 16:42:09 2018 -0800

    [flake8] Adding future-import check (#4476)
---
 scripts/permissions_cleanup.py            |  5 +++++
 setup.py                                  |  5 +++++
 superset/cache_util.py                    |  5 +++++
 superset/connectors/base/models.py        |  5 +++++
 superset/connectors/base/views.py         |  5 +++++
 superset/connectors/connector_registry.py |  5 +++++
 superset/connectors/druid/models.py       |  5 +++++
 superset/connectors/druid/views.py        |  5 +++++
 superset/connectors/sqla/models.py        |  5 +++++
 superset/connectors/sqla/views.py         |  5 +++++
 superset/db_engines/hive.py               |  5 +++++
 superset/db_engines/presto.py             |  5 +++++
 superset/dict_import_export_util.py       |  5 +++++
 superset/extract_table_names.py           |  4 ++++
 superset/import_util.py                   |  5 +++++
 superset/stats_logger.py                  |  5 +++++
 superset/views/base.py                    |  5 +++++
 superset/views/sql_lab.py                 |  5 +++++
 tests/druid_func_tests.py                 |  5 +++++
 tests/model_tests.py                      |  5 +++++
 tests/security_tests.py                   |  5 +++++
 tests/utils_tests.py                      |  5 +++++
 tests/viz_tests.py                        |  5 +++++
 tox.ini                                   | 10 ++++++++++
 24 files changed, 124 insertions(+)

diff --git a/scripts/permissions_cleanup.py b/scripts/permissions_cleanup.py
index 8d57a01..8d6e81e 100644
--- a/scripts/permissions_cleanup.py
+++ b/scripts/permissions_cleanup.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from collections import defaultdict
 
 from superset import sm
diff --git a/setup.py b/setup.py
index 2c14b90..cb53031 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import json
 import os
 import subprocess
diff --git a/superset/cache_util.py b/superset/cache_util.py
index 9612324..833ee41 100644
--- a/superset/cache_util.py
+++ b/superset/cache_util.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from flask import request
 
 from superset import tables_cache
diff --git a/superset/connectors/base/models.py 
b/superset/connectors/base/models.py
index 940cc44..9291562 100644
--- a/superset/connectors/base/models.py
+++ b/superset/connectors/base/models.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import json
 
 from sqlalchemy import (
diff --git a/superset/connectors/base/views.py 
b/superset/connectors/base/views.py
index 46a7120..11c88ca 100644
--- a/superset/connectors/base/views.py
+++ b/superset/connectors/base/views.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from flask import Markup
 
 from superset.utils import SupersetException
diff --git a/superset/connectors/connector_registry.py 
b/superset/connectors/connector_registry.py
index ffcf5ad..9b34997 100644
--- a/superset/connectors/connector_registry.py
+++ b/superset/connectors/connector_registry.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from sqlalchemy.orm import subqueryload
 
 
diff --git a/superset/connectors/druid/models.py 
b/superset/connectors/druid/models.py
index f64a249..e02bbf6 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -1,4 +1,9 @@
 # pylint: disable=invalid-unary-operand-type
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from collections import OrderedDict
 from copy import deepcopy
 from datetime import datetime, timedelta
diff --git a/superset/connectors/druid/views.py 
b/superset/connectors/druid/views.py
index ca407fb..1277dc6 100644
--- a/superset/connectors/druid/views.py
+++ b/superset/connectors/druid/views.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from datetime import datetime
 import json
 import logging
diff --git a/superset/connectors/sqla/models.py 
b/superset/connectors/sqla/models.py
index 9e2ae20..c3d36e7 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from datetime import datetime
 import logging
 
diff --git a/superset/connectors/sqla/views.py 
b/superset/connectors/sqla/views.py
index 3bc31f0..db1fe3d 100644
--- a/superset/connectors/sqla/views.py
+++ b/superset/connectors/sqla/views.py
@@ -1,4 +1,9 @@
 """Views used by the SqlAlchemy connector"""
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from flask import flash, Markup, redirect
 from flask_appbuilder import CompactCRUDMixin, expose
 from flask_appbuilder.actions import action
diff --git a/superset/db_engines/hive.py b/superset/db_engines/hive.py
index ae3c1ea..67ccb4d 100644
--- a/superset/db_engines/hive.py
+++ b/superset/db_engines/hive.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from pyhive import hive
 from TCLIService import ttypes
 from thrift import Thrift
diff --git a/superset/db_engines/presto.py b/superset/db_engines/presto.py
index eb32464..60837cc 100644
--- a/superset/db_engines/presto.py
+++ b/superset/db_engines/presto.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from pyhive import presto
 
 
diff --git a/superset/dict_import_export_util.py 
b/superset/dict_import_export_util.py
index 26cfc5d..8a02df0 100644
--- a/superset/dict_import_export_util.py
+++ b/superset/dict_import_export_util.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import logging
 
 from superset.connectors.druid.models import DruidCluster
diff --git a/superset/extract_table_names.py b/superset/extract_table_names.py
index a86b067..8cac1e1 100644
--- a/superset/extract_table_names.py
+++ b/superset/extract_table_names.py
@@ -11,6 +11,10 @@
 #
 # See:
 # http://groups.google.com/group/sqlparse/browse_thread/thread/b0bd9a022e9d4895
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
 
 import sqlparse
 from sqlparse.sql import Identifier, IdentifierList
diff --git a/superset/import_util.py b/superset/import_util.py
index 47ffc4d..180477d 100644
--- a/superset/import_util.py
+++ b/superset/import_util.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import logging
 
 from sqlalchemy.orm.session import make_transient
diff --git a/superset/stats_logger.py b/superset/stats_logger.py
index 9644f10..681b906 100644
--- a/superset/stats_logger.py
+++ b/superset/stats_logger.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import logging
 
 from colorama import Fore, Style
diff --git a/superset/views/base.py b/superset/views/base.py
index 7e0edc4..b3d698f 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from datetime import datetime
 import functools
 import json
diff --git a/superset/views/sql_lab.py b/superset/views/sql_lab.py
index 488a36e..f8d22b4 100644
--- a/superset/views/sql_lab.py
+++ b/superset/views/sql_lab.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from flask import g, redirect
 from flask_appbuilder import expose
 from flask_appbuilder.models.sqla.interface import SQLAInterface
diff --git a/tests/druid_func_tests.py b/tests/druid_func_tests.py
index 3deb3e2..a5a0c04 100644
--- a/tests/druid_func_tests.py
+++ b/tests/druid_func_tests.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import json
 import unittest
 
diff --git a/tests/model_tests.py b/tests/model_tests.py
index 94a5358..d23c84a 100644
--- a/tests/model_tests.py
+++ b/tests/model_tests.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 import unittest
 
 from sqlalchemy.engine.url import make_url
diff --git a/tests/security_tests.py b/tests/security_tests.py
index 6cd7780..5839cb8 100644
--- a/tests/security_tests.py
+++ b/tests/security_tests.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from superset import app, security, sm
 from .base_tests import SupersetTestCase
 
diff --git a/tests/utils_tests.py b/tests/utils_tests.py
index 04a70b8..c5d13c6 100644
--- a/tests/utils_tests.py
+++ b/tests/utils_tests.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from datetime import date, datetime, time, timedelta
 from decimal import Decimal
 import unittest
diff --git a/tests/viz_tests.py b/tests/viz_tests.py
index e9e8d6b..e2417e5 100644
--- a/tests/viz_tests.py
+++ b/tests/viz_tests.py
@@ -1,3 +1,8 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
 from datetime import datetime
 import unittest
 
diff --git a/tox.ini b/tox.ini
index bd94424..e9ff3a6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,8 +17,17 @@ exclude =
     superset/migrations
     superset/templates
 ignore =
+    FI12
+    FI15
+    FI16
+    FI17
+    FI50
+    FI51
+    FI53
+    FI54
 import-order-style = google
 max-line-length = 90
+require-code = True
 
 [global]
 wheel_dir = {homedir}/.wheelhouse
@@ -57,6 +66,7 @@ commands =
 deps =
     flake8
     flake8-commas
+    flake8-future-import
     flake8-import-order
     flake8-quotes
 

-- 
To stop receiving notification emails like this one, please contact
maximebeauche...@apache.org.

Reply via email to