Skip to content

Commit

Permalink
Fix E226 errors from py312-lint
Browse files Browse the repository at this point in the history
Introduced in commit 594f702 .
  • Loading branch information
nsoranzo committed May 15, 2024
1 parent b0f8568 commit 42eda1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/model/scripts/history_table_pruner.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_high(low):
high = get_high(low)
batch_counter = 1
while low <= self.max_id:
log.info(f"Running batch {batch_counter} of {self.batches}: history id range {low}-{high-1}:")
log.info(f"Running batch {batch_counter} of {self.batches}: history id range {low}-{high - 1}:")
self._run_batch(low, high)
low = high
high = get_high(high)
Expand All @@ -76,7 +76,7 @@ def _get_default_max_create_time(self):
return today.replace(month=today.month - 1)

def _run_batch(self, low, high):
empty_batch_msg = f" No histories to delete in id range {low}-{high-1}"
empty_batch_msg = f" No histories to delete in id range {low}-{high - 1}"
self._mark_histories_as_deleted_and_purged(low, high)
histories = self._get_histories(low, high)
if not histories:
Expand Down Expand Up @@ -200,7 +200,7 @@ def _set_references_to_null(self):

def _delete_histories(self, low, high):
"""Last step: delete histories that are safe to delete."""
log.info(f" Deleting histories in id range {low}-{high-1}")
log.info(f" Deleting histories in id range {low}-{high - 1}")
stmt = text(f"DELETE FROM history WHERE id IN (SELECT id FROM {TMP_TABLE})")
with self.engine.begin() as conn:
conn.execute(stmt)
Expand Down

0 comments on commit 42eda1f

Please sign in to comment.