mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: bump black to 19.10b0 and mypy to 0.770 (#9378)
* Bump black to 19.10b0 * Upgrade mypy to 0.770 * Update how inline type is defined
This commit is contained in:
@@ -567,10 +567,7 @@ class RequestAccessTests(SupersetTestCase):
|
||||
self.get_resp(ACCESS_REQUEST.format("druid", druid_ds_4_id, "go"))
|
||||
access_request4 = self.get_access_requests("gamma", "druid", druid_ds_4_id)
|
||||
|
||||
self.assertEqual(
|
||||
access_request4.roles_with_datasource,
|
||||
"<ul></ul>".format(access_request4.id),
|
||||
)
|
||||
self.assertEqual(access_request4.roles_with_datasource, "<ul></ul>")
|
||||
|
||||
# Case 5. Roles exist that contains the druid datasource.
|
||||
# add druid ds to the existing roles
|
||||
|
||||
@@ -58,7 +58,7 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
self.assertEqual(0, HiveEngineSpec.progress(log))
|
||||
|
||||
def test_job_1_launched_stage_1_map_40_progress(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
log = """
|
||||
17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
|
||||
@@ -71,7 +71,7 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
self.assertEqual(10, HiveEngineSpec.progress(log))
|
||||
|
||||
def test_job_1_launched_stage_1_map_80_reduce_40_progress(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
log = """
|
||||
17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
|
||||
@@ -85,7 +85,7 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
self.assertEqual(30, HiveEngineSpec.progress(log))
|
||||
|
||||
def test_job_1_launched_stage_2_stages_progress(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
log = """
|
||||
17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
|
||||
@@ -101,7 +101,7 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
self.assertEqual(12, HiveEngineSpec.progress(log))
|
||||
|
||||
def test_job_2_launched_stage_2_stages_progress(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
log = """
|
||||
17/02/07 19:15:55 INFO ql.Driver: Total jobs = 2
|
||||
@@ -145,7 +145,7 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
)
|
||||
|
||||
def test_hive_get_view_names_return_empty_list(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
self.assertEqual(
|
||||
[], HiveEngineSpec.get_view_names(mock.ANY, mock.ANY, mock.ANY)
|
||||
|
||||
@@ -32,7 +32,7 @@ class PrestoTests(DbEngineSpecTestCase):
|
||||
self.assertEqual("STRING", PrestoEngineSpec.get_datatype("string"))
|
||||
|
||||
def test_presto_get_view_names_return_empty_list(
|
||||
self
|
||||
self,
|
||||
): # pylint: disable=invalid-name
|
||||
self.assertEqual(
|
||||
[], PrestoEngineSpec.get_view_names(mock.ANY, mock.ANY, mock.ANY)
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# type: ignore
|
||||
from copy import copy
|
||||
|
||||
from superset.config import * # type: ignore
|
||||
from superset.config import *
|
||||
|
||||
AUTH_USER_REGISTRATION_ROLE = "alpha"
|
||||
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(DATA_DIR, "unittests.db")
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# flake8: noqa
|
||||
# type: ignore
|
||||
import os
|
||||
from copy import copy
|
||||
|
||||
from superset.config import * # type: ignore
|
||||
from superset.config import *
|
||||
|
||||
AUTH_USER_REGISTRATION_ROLE = "alpha"
|
||||
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(DATA_DIR, "unittests.db")
|
||||
|
||||
Reference in New Issue
Block a user