mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9da65d6bfd
commit
e51b95ffa8
@@ -214,7 +214,7 @@ def _find_columns_to_sanitize(cursor: Any) -> list[PlacedSanitizeFunc]:
|
||||
|
||||
:param cursor: the result set cursor
|
||||
:returns: the list of tuples consisting of the column index and sanitization function
|
||||
"""
|
||||
""" # noqa: E501
|
||||
return [
|
||||
PlacedSanitizeFunc(i, _sanitized_ocient_type_codes[cursor.description[i][1]])
|
||||
for i in range(len(cursor.description))
|
||||
@@ -317,9 +317,7 @@ class OcientEngineSpec(BaseEngineSpec):
|
||||
rows: list[tuple[Any, ...]] = super().fetch_data(cursor, limit)
|
||||
except Exception:
|
||||
with OcientEngineSpec.query_id_mapping_lock:
|
||||
del OcientEngineSpec.query_id_mapping[
|
||||
getattr(cursor, "superset_query_id")
|
||||
]
|
||||
del OcientEngineSpec.query_id_mapping[cursor.superset_query_id]
|
||||
raise
|
||||
|
||||
# TODO: Unsure if we need to verify that we are receiving rows:
|
||||
@@ -376,7 +374,7 @@ class OcientEngineSpec(BaseEngineSpec):
|
||||
OcientEngineSpec.query_id_mapping[query.id] = cursor.query_id
|
||||
|
||||
# Add the query id to the cursor
|
||||
setattr(cursor, "superset_query_id", query.id)
|
||||
cursor.superset_query_id = query.id
|
||||
return super().handle_cursor(cursor, query)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user