aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/scanner.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-13 20:49:15 +0100
committerDennis Fink2026-11-13 20:49:15 +0100
commitca71bf1f30e118dd5bade3cff817d5bbd09f680a (patch)
tree9c20d8e948581eb7689eacc9e531360ab7b459ff /webmentions_ssg/tasks/scanner.py
parent82495162be98323fc56a35f2c2a59c143a765136 (diff)
downloadwebmentions-ssg-ca71bf1f30e118dd5bade3cff817d5bbd09f680a.tar.gz
webmentions-ssg-ca71bf1f30e118dd5bade3cff817d5bbd09f680a.zip
refactor(core): clarify Webmention mutation APIs
Make in-place reset and reopen helpers return `None` so callers no longer perform pointless self-reassignment. Split explicit resend behavior into its own method instead of hiding it behind a boolean flag on `reopen`.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/tasks/scanner.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py
index f3665ee..1db52a5 100644
--- a/webmentions_ssg/tasks/scanner.py
+++ b/webmentions_ssg/tasks/scanner.py
@@ -81,9 +81,7 @@ def update_source(
existing = {webmention.target: webmention for webmention in source.sent_webmentions}
for webmention in existing.values():
- webmention = webmention.reopen(
- source.revision, webmention.target in scanned.targets
- )
+ webmention.reopen(source.revision, webmention.target in scanned.targets)
if not webmention.active and webmention.sent_revision is None:
webmention.processed_revision = source.revision
@@ -214,7 +212,7 @@ def scan_sources_task() -> None:
source.deleted_at = scan_time
for webmention in source.sent_webmentions:
- webmention = webmention.reopen(source.revision, False)
+ webmention.reopen(source.revision, False)
if webmention.sent_revision is None:
webmention.processed_revision = source.revision