diff options
| author | Dennis Fink | 2026-11-13 20:49:15 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-13 20:49:15 +0100 |
| commit | ca71bf1f30e118dd5bade3cff817d5bbd09f680a (patch) | |
| tree | 9c20d8e948581eb7689eacc9e531360ab7b459ff /webmentions_ssg/tasks/scanner.py | |
| parent | 82495162be98323fc56a35f2c2a59c143a765136 (diff) | |
| download | webmentions-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.py | 6 |
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 |
