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:
@@ -1213,8 +1213,7 @@ class PrestoEngineSpec(PrestoBaseEngineSpec):
|
||||
) -> Dict[str, Any]:
|
||||
metadata = {}
|
||||
|
||||
indexes = database.get_indexes(table_name, schema_name)
|
||||
if indexes:
|
||||
if indexes := database.get_indexes(table_name, schema_name):
|
||||
col_names, latest_parts = cls.latest_partition(
|
||||
table_name, schema_name, database, show_first=True
|
||||
)
|
||||
@@ -1278,8 +1277,7 @@ class PrestoEngineSpec(PrestoBaseEngineSpec):
|
||||
@classmethod
|
||||
def handle_cursor(cls, cursor: "Cursor", query: Query, session: Session) -> None:
|
||||
"""Updates progress information"""
|
||||
tracking_url = cls.get_tracking_url(cursor)
|
||||
if tracking_url:
|
||||
if tracking_url := cls.get_tracking_url(cursor):
|
||||
query.tracking_url = tracking_url
|
||||
session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user