diff --git a/scripts/permissions_cleanup.py b/scripts/permissions_cleanup.py index 8d6e81eb6f23e..edc9790b1a480 100644 --- a/scripts/permissions_cleanup.py +++ b/scripts/permissions_cleanup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/setup.py b/setup.py index cb5303173c3c1..4bc9412a45991 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/__init__.py b/superset/__init__.py index 8aabca403cc63..778bb6161681c 100644 --- a/superset/__init__.py +++ b/superset/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Package's main module!""" from __future__ import absolute_import from __future__ import division diff --git a/superset/cache_util.py b/superset/cache_util.py index 833ee419b693e..be6b6d5d742c3 100644 --- a/superset/cache_util.py +++ b/superset/cache_util.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/cli.py b/superset/cli.py index 5c1f6081308ab..48db7394b9dae 100755 --- a/superset/cli.py +++ b/superset/cli.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/config.py b/superset/config.py index 9e84c466b1dab..ae81cfcb6e402 100644 --- a/superset/config.py +++ b/superset/config.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """The main config file for Superset All configuration in this file can be overridden by providing a superset_config diff --git a/superset/connectors/base/models.py b/superset/connectors/base/models.py index 9291562d4d2dd..7a115988af8c2 100644 --- a/superset/connectors/base/models.py +++ b/superset/connectors/base/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/connectors/base/views.py b/superset/connectors/base/views.py index 11c88cabbddf2..42ce670270872 100644 --- a/superset/connectors/base/views.py +++ b/superset/connectors/base/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/connectors/connector_registry.py b/superset/connectors/connector_registry.py index 9b349975a596d..0a6291ab48d77 100644 --- a/superset/connectors/connector_registry.py +++ b/superset/connectors/connector_registry.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/connectors/druid/__init__.py b/superset/connectors/druid/__init__.py index b2df79851f224..a60249b87bb83 100644 --- a/superset/connectors/druid/__init__.py +++ b/superset/connectors/druid/__init__.py @@ -1,2 +1,3 @@ +# -*- coding: utf-8 -*- from . import models # noqa from . import views # noqa diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py index e02bbf615d5e0..339dd6986b155 100644 --- a/superset/connectors/druid/models.py +++ b/superset/connectors/druid/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # pylint: disable=invalid-unary-operand-type from __future__ import absolute_import from __future__ import division diff --git a/superset/connectors/druid/views.py b/superset/connectors/druid/views.py index 1277dc6f554d7..53b3670debec3 100644 --- a/superset/connectors/druid/views.py +++ b/superset/connectors/druid/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/connectors/sqla/__init__.py b/superset/connectors/sqla/__init__.py index b2df79851f224..a60249b87bb83 100644 --- a/superset/connectors/sqla/__init__.py +++ b/superset/connectors/sqla/__init__.py @@ -1,2 +1,3 @@ +# -*- coding: utf-8 -*- from . import models # noqa from . import views # noqa diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index c3d36e7645cbe..3b636e8fa2870 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py index db1fe3d753f22..8398cbcbdd135 100644 --- a/superset/connectors/sqla/views.py +++ b/superset/connectors/sqla/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Views used by the SqlAlchemy connector""" from __future__ import absolute_import from __future__ import division diff --git a/superset/dataframe.py b/superset/dataframe.py index cd9f95fd2f323..62d6cf45dd8d6 100644 --- a/superset/dataframe.py +++ b/superset/dataframe.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Superset wrapper around pandas.DataFrame. TODO(bkyryliuk): add support for the conventions like: *_dim or dim_* diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py index f0e7c67620712..0c5d5ec2d914b 100644 --- a/superset/db_engine_specs.py +++ b/superset/db_engine_specs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Compatibility layer for different database engines This modules stores logic specific to different database engines. Things diff --git a/superset/db_engines/hive.py b/superset/db_engines/hive.py index 67ccb4d853eb3..4f677faefb33e 100644 --- a/superset/db_engines/hive.py +++ b/superset/db_engines/hive.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/db_engines/presto.py b/superset/db_engines/presto.py index 60837cc943c8f..724cb9e08fe96 100644 --- a/superset/db_engines/presto.py +++ b/superset/db_engines/presto.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/dict_import_export_util.py b/superset/dict_import_export_util.py index 8a02df05778d2..4f7660ec84ceb 100644 --- a/superset/dict_import_export_util.py +++ b/superset/dict_import_export_util.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/forms.py b/superset/forms.py index e24ff03fa8db8..eb8aba889a086 100644 --- a/superset/forms.py +++ b/superset/forms.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Contains the logic to create cohesive forms on the explore view""" from __future__ import absolute_import from __future__ import division diff --git a/superset/import_util.py b/superset/import_util.py index 180477d7eb741..877cb90020c06 100644 --- a/superset/import_util.py +++ b/superset/import_util.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/jinja_context.py b/superset/jinja_context.py index dad3e9ace30fc..fe93594fce064 100644 --- a/superset/jinja_context.py +++ b/superset/jinja_context.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Defines the templating context for SQL Lab""" from __future__ import absolute_import from __future__ import division diff --git a/superset/legacy.py b/superset/legacy.py index b89b84f0fd2e7..88d75709967cd 100644 --- a/superset/legacy.py +++ b/superset/legacy.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Code related with dealing with legacy / change management""" from __future__ import absolute_import from __future__ import division diff --git a/superset/migrations/env.py b/superset/migrations/env.py index 599bda71fa822..07340485f8d4c 100755 --- a/superset/migrations/env.py +++ b/superset/migrations/env.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import with_statement import logging diff --git a/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py b/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py index b77cb9c38fade..a3279ca3b5a8a 100644 --- a/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py +++ b/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Fix wrong constraint on table columns Revision ID: 1226819ee0e3 diff --git a/superset/migrations/versions/1296d28ec131_druid_exports.py b/superset/migrations/versions/1296d28ec131_druid_exports.py index 6df37bcda5931..0b97806f75197 100644 --- a/superset/migrations/versions/1296d28ec131_druid_exports.py +++ b/superset/migrations/versions/1296d28ec131_druid_exports.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Adds params to the datasource (druid) table Revision ID: 1296d28ec131 diff --git a/superset/migrations/versions/12d55656cbca_is_featured.py b/superset/migrations/versions/12d55656cbca_is_featured.py index 3158223743064..66f6ef2154588 100644 --- a/superset/migrations/versions/12d55656cbca_is_featured.py +++ b/superset/migrations/versions/12d55656cbca_is_featured.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """is_featured Revision ID: 12d55656cbca diff --git a/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py b/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py index 0143aad58722b..3bb660005b60b 100644 --- a/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py +++ b/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """making audit nullable Revision ID: 18e88e1cc004 diff --git a/superset/migrations/versions/19a814813610_adding_metric_warning_text.py b/superset/migrations/versions/19a814813610_adding_metric_warning_text.py index cf39a0e631599..ab0165e87730e 100644 --- a/superset/migrations/versions/19a814813610_adding_metric_warning_text.py +++ b/superset/migrations/versions/19a814813610_adding_metric_warning_text.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Adding metric warning_text Revision ID: 19a814813610 diff --git a/superset/migrations/versions/1a48a5411020_adding_slug_to_dash.py b/superset/migrations/versions/1a48a5411020_adding_slug_to_dash.py index c6b88642b254b..b5efe73432998 100644 --- a/superset/migrations/versions/1a48a5411020_adding_slug_to_dash.py +++ b/superset/migrations/versions/1a48a5411020_adding_slug_to_dash.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """adding slug to dash Revision ID: 1a48a5411020 diff --git a/superset/migrations/versions/1d2ddd543133_log_dt.py b/superset/migrations/versions/1d2ddd543133_log_dt.py index a5f50f4f64c38..70cda0a0061a0 100644 --- a/superset/migrations/versions/1d2ddd543133_log_dt.py +++ b/superset/migrations/versions/1d2ddd543133_log_dt.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """log dt Revision ID: 1d2ddd543133 diff --git a/superset/migrations/versions/1e2841a4128_.py b/superset/migrations/versions/1e2841a4128_.py index 330b3b217c010..459a555086734 100644 --- a/superset/migrations/versions/1e2841a4128_.py +++ b/superset/migrations/versions/1e2841a4128_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 1e2841a4128 diff --git a/superset/migrations/versions/21e88bc06c02_annotation_migration.py b/superset/migrations/versions/21e88bc06c02_annotation_migration.py index 4c7bb807aff04..9a0e407eb0476 100644 --- a/superset/migrations/versions/21e88bc06c02_annotation_migration.py +++ b/superset/migrations/versions/21e88bc06c02_annotation_migration.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import json from alembic import op diff --git a/superset/migrations/versions/2591d77e9831_user_id.py b/superset/migrations/versions/2591d77e9831_user_id.py index 4fac61ce9eb31..2e3b7d1b30803 100644 --- a/superset/migrations/versions/2591d77e9831_user_id.py +++ b/superset/migrations/versions/2591d77e9831_user_id.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """user_id Revision ID: 2591d77e9831 diff --git a/superset/migrations/versions/27ae655e4247_make_creator_owners.py b/superset/migrations/versions/27ae655e4247_make_creator_owners.py index 2c3cdc1ed289c..92b455b86b564 100644 --- a/superset/migrations/versions/27ae655e4247_make_creator_owners.py +++ b/superset/migrations/versions/27ae655e4247_make_creator_owners.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Make creator owners Revision ID: 27ae655e4247 diff --git a/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py b/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py index 6d64887b2ff32..027a2555938ab 100644 --- a/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py +++ b/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add encrypted password field Revision ID: 289ce07647b diff --git a/superset/migrations/versions/2929af7925ed_tz_offsets_in_data_sources.py b/superset/migrations/versions/2929af7925ed_tz_offsets_in_data_sources.py index 85b54bc5cc31c..19845604e397c 100644 --- a/superset/migrations/versions/2929af7925ed_tz_offsets_in_data_sources.py +++ b/superset/migrations/versions/2929af7925ed_tz_offsets_in_data_sources.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """TZ offsets in data sources Revision ID: 2929af7925ed diff --git a/superset/migrations/versions/2fcdcb35e487_saved_queries.py b/superset/migrations/versions/2fcdcb35e487_saved_queries.py index 43aa277c55055..629cc7610f1ff 100644 --- a/superset/migrations/versions/2fcdcb35e487_saved_queries.py +++ b/superset/migrations/versions/2fcdcb35e487_saved_queries.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """saved_queries Revision ID: 2fcdcb35e487 @@ -30,8 +31,8 @@ def upgrade(): sa.Column('created_by_fk', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['changed_by_fk'], ['ab_user.id'], ), sa.ForeignKeyConstraint(['created_by_fk'], ['ab_user.id'], ), - sa.ForeignKeyConstraint(['user_id'], [u'ab_user.id'], ), - sa.ForeignKeyConstraint(['db_id'], [u'dbs.id'], ), + sa.ForeignKeyConstraint(['user_id'], ['ab_user.id'], ), + sa.ForeignKeyConstraint(['db_id'], ['dbs.id'], ), sa.PrimaryKeyConstraint('id') ) diff --git a/superset/migrations/versions/315b3f4da9b0_adding_log_model.py b/superset/migrations/versions/315b3f4da9b0_adding_log_model.py index d9fdfaccea1b3..ddceff571f513 100644 --- a/superset/migrations/versions/315b3f4da9b0_adding_log_model.py +++ b/superset/migrations/versions/315b3f4da9b0_adding_log_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """adding log model Revision ID: 315b3f4da9b0 diff --git a/superset/migrations/versions/33d996bcc382_update_slice_model.py b/superset/migrations/versions/33d996bcc382_update_slice_model.py index a92a959c5c151..28ef8310a3fe7 100644 --- a/superset/migrations/versions/33d996bcc382_update_slice_model.py +++ b/superset/migrations/versions/33d996bcc382_update_slice_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from alembic import op import sqlalchemy as sa from superset import db diff --git a/superset/migrations/versions/3b626e2a6783_sync_db_with_models.py b/superset/migrations/versions/3b626e2a6783_sync_db_with_models.py index e20b8d4806566..f1bf94968fbd8 100644 --- a/superset/migrations/versions/3b626e2a6783_sync_db_with_models.py +++ b/superset/migrations/versions/3b626e2a6783_sync_db_with_models.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Sync DB with the models.py. Sqlite doesn't support alter on tables, that's why most of the operations diff --git a/superset/migrations/versions/3c3ffe173e4f_add_sql_string_to_table.py b/superset/migrations/versions/3c3ffe173e4f_add_sql_string_to_table.py index 5b64bc40df2f0..d73bdc0be486f 100644 --- a/superset/migrations/versions/3c3ffe173e4f_add_sql_string_to_table.py +++ b/superset/migrations/versions/3c3ffe173e4f_add_sql_string_to_table.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add_sql_string_to_table Revision ID: 3c3ffe173e4f diff --git a/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py b/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py index 18a54416e67c5..484d0935dd421 100644 --- a/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py +++ b/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """database options for sql lab Revision ID: 41f6a59a61f2 diff --git a/superset/migrations/versions/430039611635_log_more.py b/superset/migrations/versions/430039611635_log_more.py index aec2b32ed95c4..6b8cbb331a85a 100644 --- a/superset/migrations/versions/430039611635_log_more.py +++ b/superset/migrations/versions/430039611635_log_more.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """log more Revision ID: 430039611635 diff --git a/superset/migrations/versions/43df8de3a5f4_dash_json.py b/superset/migrations/versions/43df8de3a5f4_dash_json.py index c56ddc8f5fb26..9dcc7b2ff67d0 100644 --- a/superset/migrations/versions/43df8de3a5f4_dash_json.py +++ b/superset/migrations/versions/43df8de3a5f4_dash_json.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 43df8de3a5f4 diff --git a/superset/migrations/versions/4500485bde7d_allow_run_sync_async.py b/superset/migrations/versions/4500485bde7d_allow_run_sync_async.py index 0695e2cda59b6..deee3c019660f 100644 --- a/superset/migrations/versions/4500485bde7d_allow_run_sync_async.py +++ b/superset/migrations/versions/4500485bde7d_allow_run_sync_async.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """allow_run_sync_async Revision ID: 4500485bde7d diff --git a/superset/migrations/versions/472d2f73dfd4_.py b/superset/migrations/versions/472d2f73dfd4_.py index d74fd03a7b7c1..d5a1c039208c8 100644 --- a/superset/migrations/versions/472d2f73dfd4_.py +++ b/superset/migrations/versions/472d2f73dfd4_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 472d2f73dfd4 diff --git a/superset/migrations/versions/4736ec66ce19_.py b/superset/migrations/versions/4736ec66ce19_.py index de86a392292ad..280132d61ec81 100644 --- a/superset/migrations/versions/4736ec66ce19_.py +++ b/superset/migrations/versions/4736ec66ce19_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 4736ec66ce19 diff --git a/superset/migrations/versions/4e6a06bad7a8_init.py b/superset/migrations/versions/4e6a06bad7a8_init.py index add55f86714a9..7c06134c09aea 100644 --- a/superset/migrations/versions/4e6a06bad7a8_init.py +++ b/superset/migrations/versions/4e6a06bad7a8_init.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Init Revision ID: 4e6a06bad7a8 diff --git a/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py b/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py index 8cd1123097f8e..b8601e14fe248 100644 --- a/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py +++ b/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """owners_many_to_many Revision ID: 4fa88fe24e94 @@ -19,16 +20,16 @@ def upgrade(): sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('dashboard_id', sa.Integer(), nullable=True), - sa.ForeignKeyConstraint(['dashboard_id'], [u'dashboards.id'], ), - sa.ForeignKeyConstraint(['user_id'], [u'ab_user.id'], ), + sa.ForeignKeyConstraint(['dashboard_id'], ['dashboards.id'], ), + sa.ForeignKeyConstraint(['user_id'], ['ab_user.id'], ), sa.PrimaryKeyConstraint('id'), ) op.create_table('slice_user', sa.Column('id', sa.Integer(), nullable=False), sa.Column('user_id', sa.Integer(), nullable=True), sa.Column('slice_id', sa.Integer(), nullable=True), - sa.ForeignKeyConstraint(['slice_id'], [u'slices.id'], ), - sa.ForeignKeyConstraint(['user_id'], [u'ab_user.id'], ), + sa.ForeignKeyConstraint(['slice_id'], ['slices.id'], ), + sa.ForeignKeyConstraint(['user_id'], ['ab_user.id'], ), sa.PrimaryKeyConstraint('id'), ) diff --git a/superset/migrations/versions/525c854f0005_log_this_plus.py b/superset/migrations/versions/525c854f0005_log_this_plus.py index 9eaebef2a9900..1db3f5c76006a 100644 --- a/superset/migrations/versions/525c854f0005_log_this_plus.py +++ b/superset/migrations/versions/525c854f0005_log_this_plus.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """log_this_plus Revision ID: 525c854f0005 diff --git a/superset/migrations/versions/55179c7f25c7_sqla_descr.py b/superset/migrations/versions/55179c7f25c7_sqla_descr.py index aade0b930aa0c..814da0b184f0e 100644 --- a/superset/migrations/versions/55179c7f25c7_sqla_descr.py +++ b/superset/migrations/versions/55179c7f25c7_sqla_descr.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """sqla_descr Revision ID: 55179c7f25c7 diff --git a/superset/migrations/versions/5a7bad26f2a7_.py b/superset/migrations/versions/5a7bad26f2a7_.py index 66dc20aae35e2..d70a5ab7eb1b8 100644 --- a/superset/migrations/versions/5a7bad26f2a7_.py +++ b/superset/migrations/versions/5a7bad26f2a7_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 5a7bad26f2a7 diff --git a/superset/migrations/versions/5e4a03ef0bf0_add_request_access_model.py b/superset/migrations/versions/5e4a03ef0bf0_add_request_access_model.py index ad6375f1837c4..b580e239cca0f 100644 --- a/superset/migrations/versions/5e4a03ef0bf0_add_request_access_model.py +++ b/superset/migrations/versions/5e4a03ef0bf0_add_request_access_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add access_request table to manage requests to access datastores. Revision ID: 5e4a03ef0bf0 diff --git a/superset/migrations/versions/6414e83d82b7_.py b/superset/migrations/versions/6414e83d82b7_.py index 35dabe1bc2dfa..ed1edec6fe674 100644 --- a/superset/migrations/versions/6414e83d82b7_.py +++ b/superset/migrations/versions/6414e83d82b7_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 6414e83d82b7 diff --git a/superset/migrations/versions/65903709c321_allow_dml.py b/superset/migrations/versions/65903709c321_allow_dml.py index 9860c503a9ba3..cf5f50a6fb853 100644 --- a/superset/migrations/versions/65903709c321_allow_dml.py +++ b/superset/migrations/versions/65903709c321_allow_dml.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """allow_dml Revision ID: 65903709c321 diff --git a/superset/migrations/versions/67a6ac9b727b_update_spatial_params.py b/superset/migrations/versions/67a6ac9b727b_update_spatial_params.py index b3e81d6e96443..e322c5eea52c1 100644 --- a/superset/migrations/versions/67a6ac9b727b_update_spatial_params.py +++ b/superset/migrations/versions/67a6ac9b727b_update_spatial_params.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """update_spatial_params Revision ID: 67a6ac9b727b diff --git a/superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py b/superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py index 2d7ce54107a83..7ad56c7f23b6e 100644 --- a/superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py +++ b/superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add fetch values predicate Revision ID: 732f1c06bcbf diff --git a/superset/migrations/versions/763d4b211ec9_fixing_audit_fk.py b/superset/migrations/versions/763d4b211ec9_fixing_audit_fk.py index d8feb778216fe..f25b3bab36444 100644 --- a/superset/migrations/versions/763d4b211ec9_fixing_audit_fk.py +++ b/superset/migrations/versions/763d4b211ec9_fixing_audit_fk.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """fixing audit fk Revision ID: 763d4b211ec9 diff --git a/superset/migrations/versions/7dbf98566af7_slice_description.py b/superset/migrations/versions/7dbf98566af7_slice_description.py index 329af9ef2d78d..58e295d426045 100644 --- a/superset/migrations/versions/7dbf98566af7_slice_description.py +++ b/superset/migrations/versions/7dbf98566af7_slice_description.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 7dbf98566af7 diff --git a/superset/migrations/versions/7e3ddad2a00b_results_key_to_query.py b/superset/migrations/versions/7e3ddad2a00b_results_key_to_query.py index f2a46085631da..b2ae3dabd962e 100644 --- a/superset/migrations/versions/7e3ddad2a00b_results_key_to_query.py +++ b/superset/migrations/versions/7e3ddad2a00b_results_key_to_query.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """results_key to query Revision ID: 7e3ddad2a00b diff --git a/superset/migrations/versions/836c0bf75904_cache_timeouts.py b/superset/migrations/versions/836c0bf75904_cache_timeouts.py index d050c49c0bb4b..b5e5d4719004b 100644 --- a/superset/migrations/versions/836c0bf75904_cache_timeouts.py +++ b/superset/migrations/versions/836c0bf75904_cache_timeouts.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """cache_timeouts Revision ID: 836c0bf75904 diff --git a/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py b/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py index 3a46ffe18a902..86818545696d2 100644 --- a/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py +++ b/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Adding extra field to Database model Revision ID: 867bf4f117f9 diff --git a/superset/migrations/versions/8e80a26a31db_.py b/superset/migrations/versions/8e80a26a31db_.py index 54edc58a80a36..b80c82dcf0ae4 100644 --- a/superset/migrations/versions/8e80a26a31db_.py +++ b/superset/migrations/versions/8e80a26a31db_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 8e80a26a31db diff --git a/superset/migrations/versions/956a063c52b3_adjusting_key_length.py b/superset/migrations/versions/956a063c52b3_adjusting_key_length.py index d83f63212846d..843433ee50509 100644 --- a/superset/migrations/versions/956a063c52b3_adjusting_key_length.py +++ b/superset/migrations/versions/956a063c52b3_adjusting_key_length.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """adjusting key length Revision ID: 956a063c52b3 diff --git a/superset/migrations/versions/960c69cb1f5b_.py b/superset/migrations/versions/960c69cb1f5b_.py index 62ee976577d11..a7ac3dfdef1d6 100644 --- a/superset/migrations/versions/960c69cb1f5b_.py +++ b/superset/migrations/versions/960c69cb1f5b_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add dttm_format related fields in table_columns Revision ID: 960c69cb1f5b diff --git a/superset/migrations/versions/979c03af3341_.py b/superset/migrations/versions/979c03af3341_.py index 6cb241f388d01..48c37277e1095 100644 --- a/superset/migrations/versions/979c03af3341_.py +++ b/superset/migrations/versions/979c03af3341_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: 979c03af3341 diff --git a/superset/migrations/versions/a2d606a761d9_adding_favstar_model.py b/superset/migrations/versions/a2d606a761d9_adding_favstar_model.py index 16087cb82cf2e..5de6fe09cb31e 100644 --- a/superset/migrations/versions/a2d606a761d9_adding_favstar_model.py +++ b/superset/migrations/versions/a2d606a761d9_adding_favstar_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """adding favstar model Revision ID: a2d606a761d9 diff --git a/superset/migrations/versions/a65458420354_add_result_backend_time_logging.py b/superset/migrations/versions/a65458420354_add_result_backend_time_logging.py index 49a9d1b74e812..5eddea19489ce 100644 --- a/superset/migrations/versions/a65458420354_add_result_backend_time_logging.py +++ b/superset/migrations/versions/a65458420354_add_result_backend_time_logging.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add_result_backend_time_logging Revision ID: a65458420354 diff --git a/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py b/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py index 0f89b3f516df9..53b4fcbeac04d 100644 --- a/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py +++ b/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """query.start_running_time Revision ID: a6c18f869a4e diff --git a/superset/migrations/versions/a99f2f7c195a_rewriting_url_from_shortner_with_new_.py b/superset/migrations/versions/a99f2f7c195a_rewriting_url_from_shortner_with_new_.py index 818d08d830088..0ef58981c372c 100644 --- a/superset/migrations/versions/a99f2f7c195a_rewriting_url_from_shortner_with_new_.py +++ b/superset/migrations/versions/a99f2f7c195a_rewriting_url_from_shortner_with_new_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """rewriting url from shortner with new format Revision ID: a99f2f7c195a diff --git a/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py b/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py index e0cf1e286cbfd..5bc122277dda9 100644 --- a/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py +++ b/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add impersonate_user to dbs Revision ID: a9c47e2c1547 diff --git a/superset/migrations/versions/ab3d66c4246e_add_cache_timeout_to_druid_cluster.py b/superset/migrations/versions/ab3d66c4246e_add_cache_timeout_to_druid_cluster.py index 07c9c9172699c..82982a18de4b4 100644 --- a/superset/migrations/versions/ab3d66c4246e_add_cache_timeout_to_druid_cluster.py +++ b/superset/migrations/versions/ab3d66c4246e_add_cache_timeout_to_druid_cluster.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add_cache_timeout_to_druid_cluster Revision ID: ab3d66c4246e diff --git a/superset/migrations/versions/ad4d656d92bc_add_avg_metric.py b/superset/migrations/versions/ad4d656d92bc_add_avg_metric.py index 2adad5242d2dd..83f36f7e3ee53 100644 --- a/superset/migrations/versions/ad4d656d92bc_add_avg_metric.py +++ b/superset/migrations/versions/ad4d656d92bc_add_avg_metric.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add avg() to default metrics Revision ID: ad4d656d92bc diff --git a/superset/migrations/versions/ad82a75afd82_add_query_model.py b/superset/migrations/versions/ad82a75afd82_add_query_model.py index 91959c6a7d216..1ae6f768ccb4d 100644 --- a/superset/migrations/versions/ad82a75afd82_add_query_model.py +++ b/superset/migrations/versions/ad82a75afd82_add_query_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Update models to support storing the queries. Revision ID: ad82a75afd82 @@ -39,8 +40,8 @@ def upgrade(): sa.Column('start_time', sa.Numeric(precision=20, scale=6), nullable=True), sa.Column('changed_on', sa.DateTime(), nullable=True), sa.Column('end_time', sa.Numeric(precision=20, scale=6), nullable=True), - sa.ForeignKeyConstraint(['database_id'], [u'dbs.id'], ), - sa.ForeignKeyConstraint(['user_id'], [u'ab_user.id'], ), + sa.ForeignKeyConstraint(['database_id'], ['dbs.id'], ), + sa.ForeignKeyConstraint(['user_id'], ['ab_user.id'], ), sa.PrimaryKeyConstraint('id') ) op.add_column('dbs', sa.Column('select_as_create_table_as', sa.Boolean(), diff --git a/superset/migrations/versions/b318dfe5fb6c_adding_verbose_name_to_druid_column.py b/superset/migrations/versions/b318dfe5fb6c_adding_verbose_name_to_druid_column.py index d492427b644f8..42d841a30b43d 100644 --- a/superset/migrations/versions/b318dfe5fb6c_adding_verbose_name_to_druid_column.py +++ b/superset/migrations/versions/b318dfe5fb6c_adding_verbose_name_to_druid_column.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """adding verbose_name to druid column Revision ID: b318dfe5fb6c diff --git a/superset/migrations/versions/b347b202819b_.py b/superset/migrations/versions/b347b202819b_.py index e73751814879a..a55eed1e9aaaf 100644 --- a/superset/migrations/versions/b347b202819b_.py +++ b/superset/migrations/versions/b347b202819b_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: b347b202819b diff --git a/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py b/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py index 1c5c50a5f635a..157c3229440e6 100644 --- a/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py +++ b/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """change_table_unique_constraint Revision ID: b4456560d4f3 @@ -17,9 +18,9 @@ def upgrade(): try: # Trying since sqlite doesn't like constraints op.drop_constraint( - u'tables_table_name_key', 'tables', type_='unique') + 'tables_table_name_key', 'tables', type_='unique') op.create_unique_constraint( - u'_customer_location_uc', 'tables', + '_customer_location_uc', 'tables', ['database_id', 'schema', 'table_name']) except Exception: pass diff --git a/superset/migrations/versions/b46fa1b0b39e_add_params_to_tables.py b/superset/migrations/versions/b46fa1b0b39e_add_params_to_tables.py index 9d02ec5b4b105..c07110ac20577 100644 --- a/superset/migrations/versions/b46fa1b0b39e_add_params_to_tables.py +++ b/superset/migrations/versions/b46fa1b0b39e_add_params_to_tables.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add json_metadata to the tables table. Revision ID: b46fa1b0b39e diff --git a/superset/migrations/versions/bb51420eaf83_add_schema_to_table_model.py b/superset/migrations/versions/bb51420eaf83_add_schema_to_table_model.py index 5e5d231111cc5..771d77efc3380 100644 --- a/superset/migrations/versions/bb51420eaf83_add_schema_to_table_model.py +++ b/superset/migrations/versions/bb51420eaf83_add_schema_to_table_model.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """add schema to table model Revision ID: bb51420eaf83 diff --git a/superset/migrations/versions/bcf3126872fc_add_keyvalue.py b/superset/migrations/versions/bcf3126872fc_add_keyvalue.py index c58dad5eb1e17..39b7bb4c75339 100644 --- a/superset/migrations/versions/bcf3126872fc_add_keyvalue.py +++ b/superset/migrations/versions/bcf3126872fc_add_keyvalue.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add keyvalue table Revision ID: bcf3126872fc diff --git a/superset/migrations/versions/c3a8f8611885_materializing_permission.py b/superset/migrations/versions/c3a8f8611885_materializing_permission.py index 3ad446b61768a..f4c65a88b9382 100644 --- a/superset/migrations/versions/c3a8f8611885_materializing_permission.py +++ b/superset/migrations/versions/c3a8f8611885_materializing_permission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Materializing permission Revision ID: c3a8f8611885 diff --git a/superset/migrations/versions/c611f2b591b8_dim_spec.py b/superset/migrations/versions/c611f2b591b8_dim_spec.py index 58d50871c1c21..4ea66ec0fb64a 100644 --- a/superset/migrations/versions/c611f2b591b8_dim_spec.py +++ b/superset/migrations/versions/c611f2b591b8_dim_spec.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """dim_spec Revision ID: c611f2b591b8 diff --git a/superset/migrations/versions/ca69c70ec99b_tracking_url.py b/superset/migrations/versions/ca69c70ec99b_tracking_url.py index 8a2ef38295c67..85901af11415f 100644 --- a/superset/migrations/versions/ca69c70ec99b_tracking_url.py +++ b/superset/migrations/versions/ca69c70ec99b_tracking_url.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """tracking_url Revision ID: ca69c70ec99b diff --git a/superset/migrations/versions/d2424a248d63_.py b/superset/migrations/versions/d2424a248d63_.py index fdfabc9166c21..beba1c9f9f50c 100644 --- a/superset/migrations/versions/d2424a248d63_.py +++ b/superset/migrations/versions/d2424a248d63_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: d2424a248d63 diff --git a/superset/migrations/versions/d39b1e37131d_.py b/superset/migrations/versions/d39b1e37131d_.py index adcaa7732bcd7..f132d62800031 100644 --- a/superset/migrations/versions/d39b1e37131d_.py +++ b/superset/migrations/versions/d39b1e37131d_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: d39b1e37131d diff --git a/superset/migrations/versions/d6db5a5cdb5d_.py b/superset/migrations/versions/d6db5a5cdb5d_.py index 4a51fb8ff563d..0bb75ec6ef7dc 100644 --- a/superset/migrations/versions/d6db5a5cdb5d_.py +++ b/superset/migrations/versions/d6db5a5cdb5d_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: d6db5a5cdb5d diff --git a/superset/migrations/versions/d827694c7555_css_templates.py b/superset/migrations/versions/d827694c7555_css_templates.py index 3b20e44055969..9abd5fb2fa591 100644 --- a/superset/migrations/versions/d827694c7555_css_templates.py +++ b/superset/migrations/versions/d827694c7555_css_templates.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """css templates Revision ID: d827694c7555 diff --git a/superset/migrations/versions/d8bc074f7aad_add_new_field_is_restricted_to_.py b/superset/migrations/versions/d8bc074f7aad_add_new_field_is_restricted_to_.py index daa885767a023..0e4e92db27eef 100644 --- a/superset/migrations/versions/d8bc074f7aad_add_new_field_is_restricted_to_.py +++ b/superset/migrations/versions/d8bc074f7aad_add_new_field_is_restricted_to_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add new field 'is_restricted' to SqlMetric and DruidMetric Revision ID: d8bc074f7aad @@ -30,7 +31,7 @@ class SqlMetric(Base): __tablename__ = 'sql_metrics' id = Column(Integer, primary_key=True) is_restricted = Column(Boolean, default=False, nullable=True) - + def upgrade(): op.add_column('metrics', sa.Column('is_restricted', sa.Boolean(), nullable=True)) op.add_column('sql_metrics', sa.Column('is_restricted', sa.Boolean(), nullable=True)) @@ -38,7 +39,7 @@ def upgrade(): bind = op.get_bind() session = db.Session(bind=bind) - # don't use models.DruidMetric + # don't use models.DruidMetric # because it assumes the context is consistent with the application for obj in session.query(DruidMetric).all(): obj.is_restricted = False diff --git a/superset/migrations/versions/db0c65b146bd_update_slice_model_json.py b/superset/migrations/versions/db0c65b146bd_update_slice_model_json.py index d4135562cf4a2..e348ae06fba66 100644 --- a/superset/migrations/versions/db0c65b146bd_update_slice_model_json.py +++ b/superset/migrations/versions/db0c65b146bd_update_slice_model_json.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """update_slice_model_json Revision ID: db0c65b146bd diff --git a/superset/migrations/versions/db527d8c4c78_add_db_verbose_name.py b/superset/migrations/versions/db527d8c4c78_add_db_verbose_name.py index 4c0d4167f551f..654f0c35c9447 100644 --- a/superset/migrations/versions/db527d8c4c78_add_db_verbose_name.py +++ b/superset/migrations/versions/db527d8c4c78_add_db_verbose_name.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add verbose name to DruidCluster and Database Revision ID: db527d8c4c78 diff --git a/superset/migrations/versions/ddd6ebdd853b_annotations.py b/superset/migrations/versions/ddd6ebdd853b_annotations.py index 99f17babb0f32..f218a65b2bf85 100644 --- a/superset/migrations/versions/ddd6ebdd853b_annotations.py +++ b/superset/migrations/versions/ddd6ebdd853b_annotations.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """annotations Revision ID: ddd6ebdd853b @@ -42,7 +43,7 @@ def upgrade(): sa.Column('created_by_fk', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['changed_by_fk'], ['ab_user.id'], ), sa.ForeignKeyConstraint(['created_by_fk'], ['ab_user.id'], ), - sa.ForeignKeyConstraint(['layer_id'], [u'annotation_layer.id'], ), + sa.ForeignKeyConstraint(['layer_id'], ['annotation_layer.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_index( diff --git a/superset/migrations/versions/e46f2d27a08e_materialize_perms.py b/superset/migrations/versions/e46f2d27a08e_materialize_perms.py index 7611671fe16be..6b13a2ddafce6 100644 --- a/superset/migrations/versions/e46f2d27a08e_materialize_perms.py +++ b/superset/migrations/versions/e46f2d27a08e_materialize_perms.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """materialize perms Revision ID: e46f2d27a08e diff --git a/superset/migrations/versions/e866bd2d4976_smaller_grid.py b/superset/migrations/versions/e866bd2d4976_smaller_grid.py index ad996d4c4c158..1388cd7816a3f 100644 --- a/superset/migrations/versions/e866bd2d4976_smaller_grid.py +++ b/superset/migrations/versions/e866bd2d4976_smaller_grid.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """smaller_grid Revision ID: e866bd2d4976 Revises: 21e88bc06c02 diff --git a/superset/migrations/versions/ea033256294a_.py b/superset/migrations/versions/ea033256294a_.py index 8a5bbd21c32d4..2a08ebdbcdc33 100644 --- a/superset/migrations/versions/ea033256294a_.py +++ b/superset/migrations/versions/ea033256294a_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: ea033256294a diff --git a/superset/migrations/versions/eca4694defa7_sqllab_setting_defaults.py b/superset/migrations/versions/eca4694defa7_sqllab_setting_defaults.py index b4f7038b2bf83..7bc2c46ae1ecc 100644 --- a/superset/migrations/versions/eca4694defa7_sqllab_setting_defaults.py +++ b/superset/migrations/versions/eca4694defa7_sqllab_setting_defaults.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """sqllab_setting_defaults Revision ID: eca4694defa7 diff --git a/superset/migrations/versions/ef8843b41dac_.py b/superset/migrations/versions/ef8843b41dac_.py index 00e4de515838d..cf7d587a60ecb 100644 --- a/superset/migrations/versions/ef8843b41dac_.py +++ b/superset/migrations/versions/ef8843b41dac_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: ef8843b41dac diff --git a/superset/migrations/versions/f0fbf6129e13_adding_verbose_name_to_tablecolumn.py b/superset/migrations/versions/f0fbf6129e13_adding_verbose_name_to_tablecolumn.py index 51f4923b9cedf..f09b08a351a1f 100644 --- a/superset/migrations/versions/f0fbf6129e13_adding_verbose_name_to_tablecolumn.py +++ b/superset/migrations/versions/f0fbf6129e13_adding_verbose_name_to_tablecolumn.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Adding verbose_name to tablecolumn Revision ID: f0fbf6129e13 diff --git a/superset/migrations/versions/f162a1dea4c4_d3format_by_metric.py b/superset/migrations/versions/f162a1dea4c4_d3format_by_metric.py index 9e266e23a7296..391bdbd013723 100644 --- a/superset/migrations/versions/f162a1dea4c4_d3format_by_metric.py +++ b/superset/migrations/versions/f162a1dea4c4_d3format_by_metric.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """d3format_by_metric Revision ID: f162a1dea4c4 diff --git a/superset/migrations/versions/f18570e03440_add_query_result_key_index.py b/superset/migrations/versions/f18570e03440_add_query_result_key_index.py index 383e7b0e3b724..32d3b00d3176c 100644 --- a/superset/migrations/versions/f18570e03440_add_query_result_key_index.py +++ b/superset/migrations/versions/f18570e03440_add_query_result_key_index.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Add index on the result key to the query table. Revision ID: f18570e03440 diff --git a/superset/migrations/versions/f1f2d4af5b90_.py b/superset/migrations/versions/f1f2d4af5b90_.py index 36bae518ce063..8c77f715355c1 100644 --- a/superset/migrations/versions/f1f2d4af5b90_.py +++ b/superset/migrations/versions/f1f2d4af5b90_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Enable Filter Select Revision ID: f1f2d4af5b90 diff --git a/superset/migrations/versions/f959a6652acd_.py b/superset/migrations/versions/f959a6652acd_.py index 96186a6e3a006..73b7fcb0033d1 100644 --- a/superset/migrations/versions/f959a6652acd_.py +++ b/superset/migrations/versions/f959a6652acd_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: f959a6652acd diff --git a/superset/migrations/versions/fee7b758c130_.py b/superset/migrations/versions/fee7b758c130_.py index 28b05b17e3e7d..5b2e88d95d13d 100644 --- a/superset/migrations/versions/fee7b758c130_.py +++ b/superset/migrations/versions/fee7b758c130_.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """empty message Revision ID: fee7b758c130 diff --git a/superset/models/__init__.py b/superset/models/__init__.py index bed8c30ede7c1..18df0e60881cb 100644 --- a/superset/models/__init__.py +++ b/superset/models/__init__.py @@ -1,2 +1,3 @@ +# -*- coding: utf-8 -*- from . import core # noqa from . import sql_lab # noqa diff --git a/superset/models/annotations.py b/superset/models/annotations.py index e082be0923d11..057aae2be6871 100644 --- a/superset/models/annotations.py +++ b/superset/models/annotations.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """a collection of Annotation-related models""" from __future__ import absolute_import from __future__ import division diff --git a/superset/models/core.py b/superset/models/core.py index df45ccf533530..9c267ba498f37 100644 --- a/superset/models/core.py +++ b/superset/models/core.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """A collection of ORM sqlalchemy models for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/superset/models/helpers.py b/superset/models/helpers.py index 52e17f3cf0ec1..db395c11074d4 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """a collection of model-related helper classes and functions""" from __future__ import absolute_import from __future__ import division diff --git a/superset/models/sql_lab.py b/superset/models/sql_lab.py index 44b692b915da9..bf37db75f6172 100644 --- a/superset/models/sql_lab.py +++ b/superset/models/sql_lab.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """A collection of ORM sqlalchemy models for SQL Lab""" from __future__ import absolute_import from __future__ import division diff --git a/superset/security.py b/superset/security.py index fa056c3987912..4d5b9f42b350c 100644 --- a/superset/security.py +++ b/superset/security.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """A set of constants and methods to manage permissions and security""" from __future__ import absolute_import from __future__ import division diff --git a/superset/sql_lab.py b/superset/sql_lab.py index 64deaffea6c22..4dae72720dc97 100644 --- a/superset/sql_lab.py +++ b/superset/sql_lab.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/sql_parse.py b/superset/sql_parse.py index d42e891c64552..83eac2715f910 100644 --- a/superset/sql_parse.py +++ b/superset/sql_parse.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/stats_logger.py b/superset/stats_logger.py index 681b9066dde88..3caa38ada5c91 100644 --- a/superset/stats_logger.py +++ b/superset/stats_logger.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/translations/utils.py b/superset/translations/utils.py index 56839f5e3017e..fb4f8404ee778 100644 --- a/superset/translations/utils.py +++ b/superset/translations/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/utils.py b/superset/utils.py index f4fcd93d07687..c60f128d0e603 100644 --- a/superset/utils.py +++ b/superset/utils.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Utility functions used across Superset""" from __future__ import absolute_import from __future__ import division diff --git a/superset/views/__init__.py b/superset/views/__init__.py index c61472739814b..ab93a55ce7c13 100644 --- a/superset/views/__init__.py +++ b/superset/views/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from . import base # noqa from . import core # noqa from . import sql_lab # noqa diff --git a/superset/views/annotations.py b/superset/views/annotations.py index e11a412b78b13..dea84561df4d1 100644 --- a/superset/views/annotations.py +++ b/superset/views/annotations.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/views/base.py b/superset/views/base.py index b3d698f4e20f3..9ff883fcc6d15 100644 --- a/superset/views/base.py +++ b/superset/views/base.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/views/core.py b/superset/views/core.py index d5bbfc6e63cc9..c1c62796e081c 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function @@ -349,7 +350,7 @@ def form_post(self, form): os.remove(os.path.join(config['UPLOAD_FOLDER'], csv_filename)) except OSError: pass - message = u'Table name {} already exists. Please pick another'.format( + message = 'Table name {} already exists. Please pick another'.format( form.name.data) if isinstance(e, IntegrityError) else text_type(e) flash( message, @@ -359,7 +360,7 @@ def form_post(self, form): os.remove(os.path.join(config['UPLOAD_FOLDER'], csv_filename)) # Go back to welcome page / splash screen db_name = table.database.database_name - message = _(u'CSV file "{0}" uploaded to table "{1}" in ' + message = _('CSV file "{0}" uploaded to table "{1}" in ' 'database "{2}"'.format(csv_filename, form.name.data, db_name)) diff --git a/superset/views/sql_lab.py b/superset/views/sql_lab.py index f8d22b4f4ca92..aac1d6d2c1d7d 100644 --- a/superset/views/sql_lab.py +++ b/superset/views/sql_lab.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/superset/viz.py b/superset/viz.py index c1a8d9aa0d7e8..31e06967a1285 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """This module contains the 'Viz' objects These objects represent the backend of all the visualizations that diff --git a/tests/access_tests.py b/tests/access_tests.py index 22231518b626a..39938c9b5534b 100644 --- a/tests/access_tests.py +++ b/tests/access_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/base_tests.py b/tests/base_tests.py index 1b213faed7a5c..dcc67988c3172 100644 --- a/tests/base_tests.py +++ b/tests/base_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/celery_tests.py b/tests/celery_tests.py index 591e7939450f9..172176ebb53b2 100644 --- a/tests/celery_tests.py +++ b/tests/celery_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset Celery worker""" from __future__ import absolute_import from __future__ import division diff --git a/tests/core_tests.py b/tests/core_tests.py index aa5c3617950e4..ab2c6e6782fe7 100644 --- a/tests/core_tests.py +++ b/tests/core_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/db_engine_specs_test.py b/tests/db_engine_specs_test.py index a2310d1d8098d..1a1282ad1a47f 100644 --- a/tests/db_engine_specs_test.py +++ b/tests/db_engine_specs_test.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tests/dict_import_export_tests.py b/tests/dict_import_export_tests.py index 340c70a767418..cbe8aa2ea240f 100644 --- a/tests/dict_import_export_tests.py +++ b/tests/dict_import_export_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/druid_func_tests.py b/tests/druid_func_tests.py index a5a0c0400b125..5b535e9b7150b 100644 --- a/tests/druid_func_tests.py +++ b/tests/druid_func_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tests/druid_tests.py b/tests/druid_tests.py index ee8cfba5f6f11..d2a44f968d5b4 100644 --- a/tests/druid_tests.py +++ b/tests/druid_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/email_tests.py b/tests/email_tests.py index f7b33c9c5f5f8..3ee9f3ebf22d7 100644 --- a/tests/email_tests.py +++ b/tests/email_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for email service in Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/import_export_tests.py b/tests/import_export_tests.py index 245d4199908fa..dc9c4ade5b023 100644 --- a/tests/import_export_tests.py +++ b/tests/import_export_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Superset""" from __future__ import absolute_import from __future__ import division diff --git a/tests/model_tests.py b/tests/model_tests.py index d23c84a2de2e1..0b4a16bd450b9 100644 --- a/tests/model_tests.py +++ b/tests/model_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tests/security_tests.py b/tests/security_tests.py index 5839cb892c688..e117394a366ce 100644 --- a/tests/security_tests.py +++ b/tests/security_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tests/sqllab_tests.py b/tests/sqllab_tests.py index 53144eadacdab..01b10b262681f 100644 --- a/tests/sqllab_tests.py +++ b/tests/sqllab_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Unit tests for Sql Lab""" from __future__ import absolute_import from __future__ import division diff --git a/tests/superset_test_config.py b/tests/superset_test_config.py index 4f8c32c448163..4d13744cf8d62 100644 --- a/tests/superset_test_config.py +++ b/tests/superset_test_config.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # flake8: noqa from superset.config import * diff --git a/tests/utils_tests.py b/tests/utils_tests.py index c5d13c6624eca..172818964f684 100644 --- a/tests/utils_tests.py +++ b/tests/utils_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tests/viz_tests.py b/tests/viz_tests.py index e2417e52beade..2fe73677bd19d 100644 --- a/tests/viz_tests.py +++ b/tests/viz_tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/tox.ini b/tox.ini index e9ff3a6c77242..280bcb4798155 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ envlist = skipsdist=True [flake8] +accept-encodings = utf-8 application-import-names = superset exclude = .tox @@ -65,6 +66,7 @@ commands = flake8 deps = flake8 + flake8-coding flake8-commas flake8-future-import flake8-import-order