diff --git a/superset/examples/energy.py b/superset/examples/energy.py index 359828b44..3d4a269cc 100644 --- a/superset/examples/energy.py +++ b/superset/examples/energy.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. """Loads datasets, dashboards and slices in a new superset instance""" -# pylint: disable=C,R,W import textwrap import pandas as pd diff --git a/superset/examples/helpers.py b/superset/examples/helpers.py index b64300efe..3f1ce6704 100644 --- a/superset/examples/helpers.py +++ b/superset/examples/helpers.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. """Loads datasets, dashboards and slices in a new superset instance""" -# pylint: disable=C,R,W import json import os import zlib diff --git a/superset/examples/tabbed_dashboard.py b/superset/examples/tabbed_dashboard.py index 8b6969489..7fe504cab 100644 --- a/superset/examples/tabbed_dashboard.py +++ b/superset/examples/tabbed_dashboard.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. """Loads datasets, dashboards and slices in a new superset instance""" -# pylint: disable=C,R,W import json import textwrap @@ -24,7 +23,7 @@ from superset import db from .helpers import Dash, Slice, update_slice_ids -def load_tabbed_dashboard(only_metadata=False): +def load_tabbed_dashboard(_=False): """Creating a tabbed dashboard""" print("Creating a dashboard with nested tabs") diff --git a/superset/examples/world_bank.py b/superset/examples/world_bank.py index 2a4b607ca..73ba71286 100644 --- a/superset/examples/world_bank.py +++ b/superset/examples/world_bank.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. """Loads datasets, dashboards and slices in a new superset instance""" -# pylint: disable=C,R,W import json import os import textwrap @@ -42,7 +41,9 @@ from .helpers import ( ) -def load_world_bank_health_n_pop(only_metadata=False, force=False): +def load_world_bank_health_n_pop( + only_metadata=False, force=False +): # pylint: disable=too-many-locals """Loads the world bank health dataset, slices and a dashboard""" tbl_name = "wb_health_population" database = utils.get_example_database() @@ -84,12 +85,12 @@ def load_world_bank_health_n_pop(only_metadata=False, force=False): "sum__SP_DYN_LE00_IN", "sum__SP_RUR_TOTL", ] - for m in metrics: - if not any(col.metric_name == m for col in tbl.metrics): - aggr_func = m[:3] - col = str(column(m[5:]).compile(db.engine)) + for metric in metrics: + if not any(col.metric_name == metric for col in tbl.metrics): + aggr_func = metric[:3] + col = str(column(metric[5:]).compile(db.engine)) tbl.metrics.append( - SqlMetric(metric_name=m, expression=f"{aggr_func}({col})") + SqlMetric(metric_name=metric, expression=f"{aggr_func}({col})") ) db.session.merge(tbl)