From ca71bf1f30e118dd5bade3cff817d5bbd09f680a Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 13 Nov 2026 20:49:15 +0100 Subject: 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`. --- webmentions_ssg/tasks/scanner.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'webmentions_ssg/tasks') 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 -- cgit v1.3.1