mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +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
@@ -39,7 +39,7 @@ class QueryPruneCommand(BaseCommand):
|
||||
Attributes:
|
||||
retention_period_days (int): The number of days for which records should be retained.
|
||||
Records older than this period will be deleted.
|
||||
"""
|
||||
""" # noqa: E501
|
||||
|
||||
def __init__(self, retention_period_days: int):
|
||||
"""
|
||||
@@ -83,7 +83,7 @@ class QueryPruneCommand(BaseCommand):
|
||||
# Update the total number of deleted records
|
||||
total_deleted += result.rowcount
|
||||
|
||||
# Explicitly commit the transaction given that if an error occurs, we want to ensure that the
|
||||
# Explicitly commit the transaction given that if an error occurs, we want to ensure that the # noqa: E501
|
||||
# records that have been deleted so far are committed
|
||||
db.session.commit()
|
||||
|
||||
@@ -91,7 +91,7 @@ class QueryPruneCommand(BaseCommand):
|
||||
percentage_complete = (total_deleted / total_rows) * 100
|
||||
if percentage_complete >= next_logging_threshold:
|
||||
logger.info(
|
||||
"Deleted %s rows from the query table older than %s days (%d%% complete)",
|
||||
"Deleted %s rows from the query table older than %s days (%d%% complete)", # noqa: E501
|
||||
total_deleted,
|
||||
self.retention_period_days,
|
||||
percentage_complete,
|
||||
|
||||
Reference in New Issue
Block a user