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:
Jianchao Yang
2020-04-04 13:23:18 -07:00
committed by GitHub
parent 5e55e09e3e
commit 801e2f1777
13 changed files with 36 additions and 37 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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")

View File

@@ -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")