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 /tests | |
| 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 '')
| -rw-r--r-- | tests/tasks/test_json_serializer.py | 1 | ||||
| -rw-r--r-- | tests/tasks/test_scanner.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/tasks/test_json_serializer.py b/tests/tasks/test_json_serializer.py index c733dce..1b09783 100644 --- a/tests/tasks/test_json_serializer.py +++ b/tests/tasks/test_json_serializer.py @@ -47,6 +47,7 @@ def test_uuid_and_retry_message_survive_enqueue_dequeue(app: Flask) -> None: huey.huey.enqueue(task) from_queue = huey.huey.dequeue() + assert from_queue is not None assert from_queue.args == (identifier,) diff --git a/tests/tasks/test_scanner.py b/tests/tasks/test_scanner.py index 7eb970c..57782f1 100644 --- a/tests/tasks/test_scanner.py +++ b/tests/tasks/test_scanner.py @@ -1139,7 +1139,7 @@ def test_unexpected_parser_error_does_not_abort_other_sources( else: original_parse = source_parser.mf2py.parse - def failing_parse(*, doc: str, url: str) -> dict[str, Any]: + def failing_parse(*, doc: str, url: str) -> dict[str, Any] | list[Any]: if "/bad/" in doc: raise failure return original_parse(doc=doc, url=url) |
