mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore: Update pylint to 2.17.4 (#24700)
Co-authored-by: John Bodley <john.bodley@gmail.com>
This commit is contained in:
@@ -46,7 +46,6 @@ query_timeout = current_app.config[
|
||||
|
||||
|
||||
def set_form_data(form_data: dict[str, Any]) -> None:
|
||||
# pylint: disable=assigning-non-slot
|
||||
g.form_data = form_data
|
||||
|
||||
|
||||
@@ -90,11 +89,7 @@ def load_chart_data_into_cache(
|
||||
raise ex
|
||||
except Exception as ex:
|
||||
# TODO: QueryContext should support SIP-40 style errors
|
||||
error = str(
|
||||
ex.message # pylint: disable=no-member
|
||||
if hasattr(ex, "message")
|
||||
else ex
|
||||
)
|
||||
error = str(ex.message if hasattr(ex, "message") else ex)
|
||||
errors = [{"message": error}]
|
||||
async_query_manager.update_job(
|
||||
job_metadata, async_query_manager.STATUS_ERROR, errors=errors
|
||||
@@ -159,13 +154,9 @@ def load_explore_json_into_cache( # pylint: disable=too-many-locals
|
||||
raise ex
|
||||
except Exception as ex:
|
||||
if isinstance(ex, SupersetVizException):
|
||||
errors = ex.errors # pylint: disable=no-member
|
||||
errors = ex.errors
|
||||
else:
|
||||
error = (
|
||||
ex.message # pylint: disable=no-member
|
||||
if hasattr(ex, "message")
|
||||
else str(ex)
|
||||
)
|
||||
error = ex.message if hasattr(ex, "message") else str(ex)
|
||||
errors = [error]
|
||||
|
||||
async_query_manager.update_job(
|
||||
|
||||
@@ -221,7 +221,7 @@ def fetch_url(data: str, headers: dict[str, str]) -> dict[str, str]:
|
||||
"""
|
||||
result = {}
|
||||
try:
|
||||
baseurl = "{WEBDRIVER_BASEURL}".format(**app.config)
|
||||
baseurl = app.config["WEBDRIVER_BASEURL"]
|
||||
url = f"{baseurl}api/v1/chart/warm_up_cache"
|
||||
logger.info("Fetching %s with payload %s", url, data)
|
||||
req = request.Request(
|
||||
|
||||
@@ -90,9 +90,8 @@ def execute(self: Celery.task, report_schedule_id: int) -> None:
|
||||
except CommandException as ex:
|
||||
logger_func, level = get_logger_from_status(ex.status)
|
||||
logger_func(
|
||||
"A downstream {} occurred while generating a report: {}. {}".format(
|
||||
level, task_id, ex.message
|
||||
),
|
||||
f"A downstream {level} occurred "
|
||||
f"while generating a report: {task_id}. {ex.message}",
|
||||
exc_info=True,
|
||||
)
|
||||
if level == LoggerLevel.EXCEPTION:
|
||||
@@ -105,5 +104,5 @@ def prune_log() -> None:
|
||||
AsyncPruneReportScheduleLogCommand().run()
|
||||
except SoftTimeLimitExceeded as ex:
|
||||
logger.warning("A timeout occurred while pruning report schedule logs: %s", ex)
|
||||
except CommandException as ex:
|
||||
except CommandException:
|
||||
logger.exception("An exception occurred while pruning report schedule logs")
|
||||
|
||||
Reference in New Issue
Block a user