chore(pylint): Reenable raise-missing-from check (#16266)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2021-08-16 15:26:10 -07:00
committed by GitHub
parent 36bc7b0b80
commit be7065faf8
80 changed files with 216 additions and 211 deletions

View File

@@ -327,12 +327,12 @@ class BigQueryEngineSpec(BaseEngineSpec):
# pylint: disable=import-outside-toplevel
import pandas_gbq
from google.oauth2 import service_account
except ImportError:
except ImportError as ex:
raise Exception(
"Could not import libraries `pandas_gbq` or `google.oauth2`, which are "
"required to be installed in your environment in order "
"to upload data to BigQuery"
)
) from ex
if not table.schema:
raise Exception("The table schema must be defined")

View File

@@ -79,8 +79,8 @@ class DruidEngineSpec(BaseEngineSpec): # pylint: disable=abstract-method
"""
try:
extra = json.loads(database.extra or "{}")
except json.JSONDecodeError:
raise SupersetException("Unable to parse database extras")
except json.JSONDecodeError as ex:
raise SupersetException("Unable to parse database extras") from ex
if database.server_cert:
engine_params = extra.get("engine_params", {})

View File

@@ -262,8 +262,8 @@ class PostgresEngineSpec(PostgresBaseEngineSpec, BasicParametersMixin):
"""
try:
extra = json.loads(database.extra or "{}")
except json.JSONDecodeError:
raise SupersetException("Unable to parse database extras")
except json.JSONDecodeError as ex:
raise SupersetException("Unable to parse database extras") from ex
if database.server_cert:
engine_params = extra.get("engine_params", {})