mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
chore: Embrace the walrus operator (#24127)
This commit is contained in:
@@ -221,8 +221,7 @@ def get_query_results(
|
||||
:raises QueryObjectValidationError: if an unsupported result type is requested
|
||||
:return: JSON serializable result payload
|
||||
"""
|
||||
result_func = _result_type_functions.get(result_type)
|
||||
if result_func:
|
||||
if result_func := _result_type_functions.get(result_type):
|
||||
return result_func(query_context, query_obj, force_cached)
|
||||
raise QueryObjectValidationError(
|
||||
_("Invalid result type: %(result_type)s", result_type=result_type)
|
||||
|
||||
Reference in New Issue
Block a user