mistercrunch closed pull request #3811: [flake8] Resolving F4?? errors
URL: https://github.com/apache/incubator-superset/pull/3811
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/tests/celery_tests.py b/tests/celery_tests.py
index 8763ec1d3e..bb9ab5c61b 100644
--- a/tests/celery_tests.py
+++ b/tests/celery_tests.py
@@ -14,7 +14,6 @@
from past.builtins import basestring
from superset import app, appbuilder, cli, dataframe, db
-from superset.models import core as models
from superset.models.helpers import QueryStatus
from superset.models.sql_lab import Query
from superset.security import sync_role_definitions
diff --git a/tests/druid_tests.py b/tests/druid_tests.py
index 276a010822..7ac3829d11 100644
--- a/tests/druid_tests.py
+++ b/tests/druid_tests.py
@@ -12,8 +12,7 @@
from superset import db, security, sm
from superset.connectors.druid.models import (
- DruidCluster, DruidDatasource, DruidMetric, Postaggregator, PyDruid,
- Quantile,
+ DruidCluster, DruidDatasource, DruidMetric,
)
from .base_tests import SupersetTestCase
@@ -75,7 +74,7 @@ class DruidTests(SupersetTestCase):
def __init__(self, *args, **kwargs):
super(DruidTests, self).__init__(*args, **kwargs)
- @patch('superset.connectors.druid.models.PyDruid') # noqa ignore: F811
+ @patch('superset.connectors.druid.models.PyDruid')
def test_client(self, PyDruid):
self.login(username='admin')
instance = PyDruid.return_value
@@ -280,7 +279,7 @@ def test_filter_druid_datasource(self):
self.assertIn('datasource_for_gamma', resp)
self.assertNotIn('datasource_not_for_gamma', resp)
- @patch('superset.connectors.druid.models.PyDruid') # noqa ignore: F811
+ @patch('superset.connectors.druid.models.PyDruid')
def test_sync_druid_perm(self, PyDruid):
self.login(username='admin')
instance = PyDruid.return_value
diff --git a/tests/superset_test_config.py b/tests/superset_test_config.py
index 6e6426dd42..d65c85ff91 100644
--- a/tests/superset_test_config.py
+++ b/tests/superset_test_config.py
@@ -1,3 +1,4 @@
+# flake8: noqa
from superset.config import *
AUTH_USER_REGISTRATION_ROLE = 'alpha'
diff --git a/tests/viz_tests.py b/tests/viz_tests.py
index 0aa0b6cc23..33556aa77e 100644
--- a/tests/viz_tests.py
+++ b/tests/viz_tests.py
@@ -1,4 +1,4 @@
-from datetime import datetime, timedelta
+from datetime import datetime
import unittest
from mock import Mock, patch
@@ -8,6 +8,7 @@
from superset.utils import DTTM_ALIAS
import superset.viz as viz
+
class BaseVizTestCase(unittest.TestCase):
def test_constructor_exception_no_datasource(self):
form_data = {}
diff --git a/tox.ini b/tox.ini
index b711dce38f..39f11c3139 100644
--- a/tox.ini
+++ b/tox.ini
@@ -42,9 +42,6 @@ ignore =
E703
E731
E741
- F401
- F403
- F405
Q000
Q001
import-order-style = google
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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