From c7993952c585b66acad5275e39dbf91cf662b975 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 12 Nov 2026 22:07:12 +0100 Subject: chore(core): enable stricter Ruff lint rules Expand Ruff checks for bugbear, complexity, pathlib, return statements, simplifications, upgrades, and docstring style. Apply the resulting behavior-neutral cleanup across application and test code. --- webmentions_ssg/tasks/retention.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'webmentions_ssg/tasks/retention.py') diff --git a/webmentions_ssg/tasks/retention.py b/webmentions_ssg/tasks/retention.py index bf79512..935f54b 100644 --- a/webmentions_ssg/tasks/retention.py +++ b/webmentions_ssg/tasks/retention.py @@ -39,8 +39,9 @@ def purge_old_received_webmentions() -> int: ) db.session.commit() - removed = result.rowcount - if removed: - current_app.logger.info("Purged %d old failed/deleted Webmentions", removed) + if result.rowcount: + current_app.logger.info( + "Purged %d old failed/deleted Webmentions", result.rowcount + ) - return removed + return result.rowcount -- cgit v1.3.1