From 9a842dc1eabbb5469f421b6a4f8566ee167d379f Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Mon, 19 Feb 2024 16:29:20 +0000 Subject: [PATCH] fix(ci): mypy pre-commit issues (#27161) (cherry picked from commit 8dc6cbe206b4a4e5da365f66c3d2fcfec7dd9c6b) --- superset/sqllab/api.py | 4 +++- superset/sqllab/execution_context_convertor.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/superset/sqllab/api.py b/superset/sqllab/api.py index 6be378a9b5117..eeb95e6aadb4e 100644 --- a/superset/sqllab/api.py +++ b/superset/sqllab/api.py @@ -343,7 +343,9 @@ def get_results(self, **kwargs: Any) -> FlaskResponse: # return the result without special encoding return json_success( json.dumps( - result, default=utils.json_iso_dttm_ser, ignore_nan=True, encoding=None + result, + default=utils.json_iso_dttm_ser, + ignore_nan=True, ), 200, ) diff --git a/superset/sqllab/execution_context_convertor.py b/superset/sqllab/execution_context_convertor.py index 430db0d52ff9c..a1e7a86d0af99 100644 --- a/superset/sqllab/execution_context_convertor.py +++ b/superset/sqllab/execution_context_convertor.py @@ -60,7 +60,6 @@ def serialize_payload(self) -> str: ), default=utils.pessimistic_json_iso_dttm_ser, ignore_nan=True, - encoding=None, ) return json.dumps(