diff options
| author | Dennis Fink | 2026-11-12 20:54:29 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-12 20:54:29 +0100 |
| commit | b930b4425b91aa42abcec6c3443685065a5ca242 (patch) | |
| tree | 23c0a5af8f4490ab744368e264ceca21559c9766 /webmentions_ssg/tasks/sender.py | |
| parent | a7879fde33769a3facc3b2e4e5a31f98b67d28db (diff) | |
| download | webmentions-ssg-b930b4425b91aa42abcec6c3443685065a5ca242.tar.gz webmentions-ssg-b930b4425b91aa42abcec6c3443685065a5ca242.zip | |
chore(core): fix task typing issues
Add explicit result assertions, broader parser annotations, and
SQLAlchemy result casts so static type checking reflects the runtime
guarantees of task code.
Diffstat (limited to 'webmentions_ssg/tasks/sender.py')
| -rw-r--r-- | webmentions_ssg/tasks/sender.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webmentions_ssg/tasks/sender.py b/webmentions_ssg/tasks/sender.py index 3c4c717..a9db128 100644 --- a/webmentions_ssg/tasks/sender.py +++ b/webmentions_ssg/tasks/sender.py @@ -6,6 +6,7 @@ import uuid from datetime import UTC, datetime, timedelta +from typing import Any, cast import httpx import sqlalchemy as sa @@ -173,7 +174,7 @@ def send_webmention_task(webmention_uuid: uuid.UUID) -> None: ) db.session.commit() - if claim.rowcount != 1: + if cast(sa.CursorResult[Any], claim).rowcount != 1: return db.session.refresh(webmention) |
