diff options
| author | Dennis Fink | 2026-11-12 22:07:12 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-12 22:07:12 +0100 |
| commit | c7993952c585b66acad5275e39dbf91cf662b975 (patch) | |
| tree | 976b3746444b3bd0bbb269bef9197c8b6a2e1696 /webmentions_ssg/tasks/retention.py | |
| parent | b930b4425b91aa42abcec6c3443685065a5ca242 (diff) | |
| download | webmentions-ssg-c7993952c585b66acad5275e39dbf91cf662b975.tar.gz webmentions-ssg-c7993952c585b66acad5275e39dbf91cf662b975.zip | |
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.
Diffstat (limited to 'webmentions_ssg/tasks/retention.py')
| -rw-r--r-- | webmentions_ssg/tasks/retention.py | 9 |
1 files changed, 5 insertions, 4 deletions
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 |
